test - logic tags

Here is the basic content.  We're testing the logic tags, and certain properties and methods of key NB objects, as explained in:

http://nationbuilder.com/liquid_basics#tags 

This line is typed in the page template... Below it is the liquid logic/code:


{% tablerow post in page.blog.most_recent_blog_posts cols: 2 %} {% endtablerow %}
{{ post.headline }}


Saudi Arabia and Wahhabism BDS: Disinformation in Ontario’s Bill 202
Canada and the Int'l Arms Trade Treaty Ayman Odeh: Rising Palestinian leader
Canada and the $15B Saudi Arms Deal BDS: Informing the Parliamentary Debate
BDS (Boycott, Divestment and Sanctions) New Palestinian Political Party in Israel
Yemeni Civil War, 2015 Islamophobia in Canada


First text
Second text
Third text
Liquid doesn't seem to be able to parse these variables in the cycle tag

Saudi Arabia and Wahhabism
{{ text2 }}BDS: Disinformation in Ontario’s Bill 202
{{ text3 }}Canada and the Int'l Arms Trade Treaty
Ayman Odeh: Rising Palestinian leader
{{ text2 }}Canada and the $15B Saudi Arms Deal
{{ text3 }}BDS: Informing the Parliamentary Debate
BDS (Boycott, Divestment and Sanctions)
{{ text2 }}New Palestinian Political Party in Israel
{{ text3 }}Yemeni Civil War, 2015
Islamophobia in Canada


Saudi Arabia and Wahhabism
BDS: Disinformation in Ontario’s Bill 202
Canada and the Int'l Arms Trade Treaty
Ayman Odeh: Rising Palestinian leader
Canada and the $15B Saudi Arms Deal
BDS: Informing the Parliamentary Debate
BDS (Boycott, Divestment and Sanctions)
New Palestinian Political Party in Israel
Yemeni Civil War, 2015
Islamophobia in Canada


Begin - Using the assign method - sorts as per http://nationbuilder.com/blog_page_variables
Note: we're using the truncate filter to truncate the post headline down to three words

Liquid error: comparison of PageDrop with PageDrop failed End - Using the assign method


{% if page.is_commentable? == true %}

This page takes comments

{% endif %}

This page takes comments


{% if page.tags_count == 0 %}

This page has no page tag

{% else %}

This page has at least one page tag

{% endif %}

This page has at least one page tag


{% if page.tags_count == 2 %}

This page has two page tags

{% elsif page.type_name == "Basic" %}

This page is a Basic page

{% endif %}

This page is a Basic page


{% case page.slug %} {% when 'europe_main' %} {% include "europe_nav" %} {% when 'asia_main' %} {% include "asia_nav" %} {% else %} {% include "nav" %} {% endcase %} {% case page.slug %} {% when 'europe_main' %} {% include "europe_nav" %} {% when 'asia_main' %} {% include "asia_nav" %} {% else %} {% include "nav" %} {% endcase %}

Be the first to comment

Please check your e-mail for a link to activate your account.