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

Condition: if is in specific hook


Well-known member
I want to check inside template 'breadcrumb' that it currently shown at the top. For example I need something like this:
<xen:if hook="page_container_breadcrumb_top">My code</xen:if>

Is it possible to do in templates?


Well-known member
I mean I want to check inside template that it is currently used in specific hook. We have breadcrumbs at the top and at the bottom, but I want my code to show up only in the top breadcrumb, that means I need to check somehow that the template 'breadcrumb' is used by hook 'page_container_breadcrumb_top' at the moment.


Well-known member
It's more simple. Need check variable $microdata in template "breadcrumb":
                        <xen:hook name="page_container_breadcrumb_top">
                        <div class="breadBoxTop">
                            <xen:if is="{$topctrl}"><div class="topCtrl">{xen:raw $topctrl}</div></xen:if>
                            <xen:include template="breadcrumb"><xen:set var="$microdata">1</xen:set></xen:include>
Inititalized variable - top. Not - bottom.