Quantcast
Channel: C1 CMS Foundation - Open Source on .NET
Viewing all articles
Browse latest Browse all 2540

New Post: Keep menu items visible

$
0
0

Hi All,

I'm having  a menu which needs to show a selection of the pages i have. Therefore I made an data-item containing a selection of pages called SideLinks (like the TopLinksmenu).

I would like them to display the underlying pages (siblings) which is not the problem, but when I select a sibling then my siblings disappear :(
How to fix this so my subpages stay visible when I select on of them

This is my xsl

<?xmlversion="1.0"encoding="UTF-8"?><xsl:stylesheetversion="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:in="http://www.composite.net/ns/transformation/input/1.0"xmlns:lang="http://www.composite.net/ns/localization/1.0"xmlns:f="http://www.composite.net/ns/function/1.0"xmlns="http://www.w3.org/1999/xhtml"exclude-result-prefixes="xsl in lang f"><xsl:variablename="SideLinks"select="/in:inputs/in:result[@name='GetSideLinkXml']/SideLink"/><xsl:variablename="SiteMap"select="/in:inputs/in:result[@name='SitemapXml']"/><xsl:variablename="CurrentPageID"select="/in:inputs/in:result[@name='CurrentPageID']"/><xsl:templatematch="/"><html><head></head><body><divid="SideLinks"><xsl:for-eachselect="$SideLinks"><xsl:apply-templatesselect="."/></xsl:for-each></div></body></html></xsl:template><xsl:templatematch="SideLink"><span><ahref="~/Renderers/Page.aspx?pageId={@Page}"><xsl:attributename="class"><xsl:iftest="@Page=$CurrentPageID"><xsl:text> NavigationOpen</xsl:text></xsl:if><xsl:iftest="@Page=$CurrentPageID"><xsl:text> NavigationSelected</xsl:text></xsl:if></xsl:attribute><xsl:choose><xsl:whentest="@Page.MenuTitle!=''"><xsl:value-ofselect="@Page.MenuTitle"/></xsl:when><xsl:otherwise><xsl:value-ofselect="@Page.Title"/></xsl:otherwise></xsl:choose></a></span><xsl:iftest="@Page=$CurrentPageID"><xsl:for-eachselect="$SiteMap/Page/Page[@isopen='true']"><xsl:apply-templatesselect="Page"/></xsl:for-each></xsl:if></xsl:template><xsl:templatematch="Page"><span><ahref="{@URL}"><xsl:iftest="@iscurrent='true'"><xsl:attributename="class">selected</xsl:attribute></xsl:if><xsl:value-ofselect="@MenuTitle"/><xsl:iftest="@isopen='true' and Page[@MenuTitle!='']"><xsl:apply-templatesselect="Page[@MenuTitle!='']"/></xsl:if></a></span></xsl:template></xsl:stylesheet>

Viewing all articles
Browse latest Browse all 2540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>