2

I have a static page of shop. On this page there are different images. I want to link these images to the specific categories types. For example i have an image of men's clothes. Now i have also a category of men's clothes. on clicking the image it should go to that category. As this page is made from the admin>content>pages. I am not able to get the base url or the link url.

Some one can help me in this regard?

5

Please use below code for link in static page

<a href="{{config path="web/unsecure/base_url"}}<<YOUR CATEGORY URL KEY>>" target="_self"><img src="{{media url="wysiwyg/clothing.png"}}" alt="" width="IMGWIDTH" height="IMGHEIGHT" /></a>

OR

<a href="{{store url='YOUR CATEGORY URL KEY'}}" target="_self"><img src="{{media url="wysiwyg/clothing.png"}}" alt="" width="IMGWIDTH" height="IMGHEIGHT" /></a>
  • how this will link to the category ? – tech_geek Oct 17 '17 at 8:14
  • actually on the category when i click on categpry it opens a page of html. by writing clothing i am guessing you meant by the clothing category? – tech_geek Oct 17 '17 at 8:17
  • Yes exactly, use your category "URL key" in place of clothing – Aasim Goriya Oct 17 '17 at 8:19
  • check my updated ans – Aasim Goriya Oct 17 '17 at 8:20
  • 1
    I've added both options in my ans – Aasim Goriya Oct 17 '17 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.