Liquid required

Subscribe to Liquid required 3 post(s), 2 voice(s)

 
Avatar Garry 31 post(s)

I want to be able to test the expression post.link in the following section of the default template for newsletters

{% for post in posts %} <a name="{{post.digest}}" shape="rect"></a><h1>{{ post.title }}</h1><h4>{{ post.published_on | nice_time }}</h4> {{ post.content_encoded_or_content }} <p><a href="{{ post.link }}" shape="rect">Head to the web site for more</a></p><hr /> {% endfor %}

so that I can tell what website the link came from
eg

if stringLeft(post.link, 9characters) = “vb123.com” then “Head to vb123.com for more”
else “Head to website for more”
end if

 
Avatar Ben Myles Administrator 69 post(s)

Sounds like you need a regular expression. Let me see what I can come up with – I’ll reply here.

 
Avatar Garry 31 post(s)

Did you come up with Anything?