{% for articleitem in articleList %}
{% if articleitem.articleCategory|stringformat:"s" == "homepage" %}
{% with "omCmsMain/theme/"|add:siteInfoData.siteTheme|add:"/sectionLayouts/"|add:articleitem.articleCategory.itemCategory|add:".html" as nameTemplate %}
{% if nameTemplate|template_exists %}
{% include nameTemplate %}
{% else %}
{% with "omCmsMain/theme/"|add:siteInfoData.siteTheme|add:"/sectionLayouts/default.html" as defaultTemplate %}
{# include defaultTemplate %}
{% endwith %}
{% endif %}
{% endwith %}
{% endif %}
{% endfor %}
{% for articleitem in articleList %}
{% if articleitem.articleCategory|stringformat:"s" == item.itemCategory|stringformat:"s" %}
{% if item.itemTemplate %}
{% with "omCmsMain/theme/"|add:siteInfoData.siteTheme|add:"/sectionLayouts/"|add:item.itemTemplate.itemLayoutName|add:".html" as nameTemplate %}
{% if nameTemplate|template_exists %}
{% include nameTemplate %}
{% endif %}
{% endwith %}
{% else %}
{% with "omCmsMain/theme/"|add:siteInfoData.siteTheme|add:"/sectionLayouts/"|add:item.itemCategory|add:".html" as nameTemplate %}
{% if nameTemplate|template_exists %}
{% include nameTemplate %}
{% else %}
{% with "omCmsMain/theme/"|add:siteInfoData.siteTheme|add:"/sectionLayouts/default.html" as nameTemplate %}
{% include nameTemplate %}
{% endwith %}
{% endif %}
{% endwith %}
{% endif %}
{% endif %}
{% endfor %}