I'm sorry, for the first post (haven't been around too long on this forum).
I have a question about hiding certain pages in Umbraco. I know this is possible and it is already implemented on my site: so certain pages are redirected to the login page if they're not logged in.
Now my question is how to hide pages when you not need to be logged in. Because I have a login/register/pass reminder page. But these pages only need to show up when needed, so when a visitor visits a page for which a login is required to view it. Now what I need to do is hide these login pages etc. from my sitemap and from the subpages listings.
Anyone has an idea how I can do this?
For my sitemap I'm using the following code:
Code:<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxml="urn:schemas-microsoft-com:xslt"
xmlns:umbraco.library="urn:umbraco.library"
exclude-result-prefixes="msxml umbraco.library">
<xsl:output method="html"/>
<xsl:param name="currentPage"/>
<xsl:variable name="maxLevelForSitemap" select="6"/>
<xsl:template match="/">
<div id="sitemap">
<xsl:call-template name="drawNodes">
<xsl:with-param name="parent" select="$currentPage/ancestor-or-self::node [@level=1]"/>
</xsl:call-template>
</div>
</xsl:template>
<xsl:template name="drawNodes">
<xsl:param name="parent"/>
<ul>
<xsl:for-each select="$parent/node">
<li>
<a href="{umbraco.library:NiceUrl(@id)}">
<xsl:value-of select="@nodeName"/>
</a>
<xsl:call-template name="drawNodes">
<xsl:with-param name="parent" select="."/>
</xsl:call-template>
</li>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet>