Changing the logo link based on the current page

emin1
New Member
1 0 0

Hi,

How can we do this?

If the page link contains "/en" [ for example www.shopname.com/en/collection/products/shirt ]
When you click the logo, logo directs you to www.shopname.com/en

If the page link contains "/fr" [for example www.shopname.com/fr/collection/products/shirt ]
When you click the logo, logo directs you to www.shopname.com/fr

Thanks

 

 

0 Likes
Jivan_Suhagiya
Shopify Partner
494 68 104

Hi,
Actually its not possible to write something between shopname.com/ and /collection 
if you use subdomain for each store(If you have multiple stores), then I think no need of condition 

If helpful then please Like and Accept Solution.
Email: suhagiyajivan1992@gmail.com
Skype: jivan.suhagiya
First kind of Checkout Reminder APP: https://apps.shopify.com/checkout-reminder
0 Likes
gina-gregory
Shopify Expert
710 48 175

 

{% if request.path contains '/fr/' %}
  <a href="/fr">Logo here</a>
{% elsif request.path contains '/en/' %}
  <a href="/en">Logo here</a>
{% else %}
  <a href="/">Logo here</a>
{% endif %}

 

0 Likes