• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

xen:if and breadcrumb navigation

#1
I have pages with or without a category. If they are in a category i want my breadcrumb like this:

Code:
addon->category->article
without category

Code:
addon->article
the point is that it seems that templates only allow one navigation tag. If I use the xen:if tag outside the xen:navigation scope I am only able to render one breadcrumb.

So to fit my needs my template would look like:

Code:
<xen:if is="{$category}">
         <xen:navigation>
                   <xen:breadcrumb href="{$categoryLink}">{$category}</xen:breadcrumb>
        </xen:navigation>
</xen:if>
         <xen:navigation>
                  <xen:breadcrumb href="{$breadcrumbLink}">{$article.article_name}  </xen:breadcrumb>
</xen:navigation>

but this way only one navigation tag gets rendered. Not both of them.


btw: xen:if tag inside of xen:navigation doesnt work (error)
 
#3
Thanks, it works this way:

Code:
<xen:if is="{$category}">
         <xen:navigation>
                   <xen:breadcrumb href="{$categoryLink}">{$category}</xen:breadcrumb>
                   <xen:breadcrumb href="{$breadcrumbLink}">{$article.article_name} </xen:breadcrumb>
        </xen:navigation>
<xen:else />
    <xen:navigation>
                  <xen:breadcrumb href="{$breadcrumbLink}">{$article.article_name}  </xen:breadcrumb>
    </xen:navigation>
</xen:if>