{% if page.collection %} {% capture page_dir %}{{ site.collections_dir }}{% endcapture %} {% assign testvar = "collection exists" %} {% endif %}