MG 1.1 Targeting Media Gallery Pages with Template Conditionals

DeltaHF

Best Weekly GIF Winner
I'm building a heavily customized theme, and I need to display a menu in the header in different areas of the site (it's like a custom version of the tabLinks bar in the default style).

What is the best way to target all Media Gallery pages (and Resource Manager pages, while we're at it...) with template conditionals?
 
Best way I can think of, but it applies to both XFMG and XFRM:
Code:
<xen:if is="{$extraTabs.middle.xengallery.selected}">
    // Media tab is selected
<xen:elseif is="{$extraTabs.middle.resources.selected}" />
    // Resources tab is selected
</xen:if>
There's a small exception to the XFMG one. There's an option to control whether the tab is "home", "middle" or "end", so if you have changed its position you will need to change "middle" to something else accordingly.
 
Top Bottom