You can simply just add the link to the frontpage by hardcoding it before the for-each statement so you insert <li><a href="/">Frontpage</a></li> right after <ul class="sf-menu">.
I wouldn't do that, think you'll get duplicate items as it's a recursive template... so should include it before the first call to drawNodes, ie after the
Get sitemap to include homepage node
Hello,
I have a runway sitemap and I would like to include the homepage node in the following structure:
Content
--Frontpage (homepage)
----Subpage1
----Subpage2
--------SubSubpage1
--------SubSubpage2
----Subpage3
Any help accomplishing this would be great. The sitemap displays everything except the frontpage (homepage) node.
Here is my XSLT code:
Hi Kevin
You can simply just add the link to the frontpage by hardcoding it before the for-each statement so you insert <li><a href="/">Frontpage</a></li> right after <ul class="sf-menu">.
Hope this helps.
/Jan
I wouldn't do that, think you'll get duplicate items as it's a recursive template... so should include it before the first call to drawNodes, ie after the
Cheers,
/Dirk
Hi Kevin,
Using the Umbraco sitemap xslt. I add an if statement just before the foreach in the drawnodes template to add in the home page link.
<ul class="sitemap">
<xsl:if test="$parent/@level = 1">
<li>
<a href="/">Home</a>
</li>
</xsl:if>
<xsl:for-each select="$parent/* [@isDoc and string(umbracoNaviHide) != '1' and @level <= $maxLevelForSitemap]">
Thanks,
Eddie
I was just struggling with this.. my issue was that I was using @currentpage!!!
is working on a reply...