Coding internal links

by Jason Hoffman - Member - 05:30PM, Sep 28, 2006

I am trying to set up an internal link from each of my collection and product pages to a blog page that I have created.

I can’t work out the correct format for creating this link. The text should say “Read our terms and conditions”.

The blog page is called “terms”.

What do I need to put in the to create the link?

Do I need to use this {% for link in blogs.terms.articles %} and {% endfor %} in the code?

Jamie

Member

04:59PM, Oct 02, 2006

I was waiting to see if anyone else commented with a “smarter” solution than I have, but here goes :)

if is a page I have just been using href=”/page/title-of-page”

if it’s a blog I have been using href=”/blogs/title-of-entry”

Hope that is a good enough fix for you.

tobi

Shopify

07:10PM, Oct 02, 2006

The easiest way is to create a new link list title “Terms” with just this one and then adding it to the collections.liquid like this:

{{ 'terms and conditions' | link_to: linklists.terms.links.first.url }}

---

Tobias Lütke
Shopify – Founder, CEO

Dietmar

Member

07:14AM, Feb 20, 2007

Can I do the reverse? Suppose I want to put a link inside my article/blog?

So far I have this:

{{“photo.jpg” | asset_url | img_tag, “Text”}}

But, that doesn’t seem to do it for me, the liquid just displays without being interpreted.

---

http://www.modacolombia.ca
Moda Colombia Lingerie in Canada

Dietmar

Member

07:16AM, Feb 20, 2007

In retrospect…what I was trying to do was pretty unlikely to work…

---

http://www.modacolombia.ca
Moda Colombia Lingerie in Canada

You must login to post a comment!

Don't have an account yet? Sign up for one.