8 users online. Create an account or sign in to join them.Users
Submenu anywhere?
This is an open discussion with 3 replies, filed under Troubleshooting.
Search
What kind of "submenu points" are you thinking of?
in the standard installation there are * Archive * About * Drafts * Admin * Debug
what do I have to do, to get something like this:
* Archive * About * my wife * my house * my boat * Drafts * Admin * Debug
@leerraum, this doesn't happen out of the box afaik.
these were the steps i did to create the sub nav the way you want it:
- any sub nav items were grouped under a common
Parent Pagein thePage > Configure > URL Settings - the outputted data source used has the default
<navigation>node with thisnavigation.xsltemplate applied to it. - i called this template from the main template like so
seems like there's an issue with markdown and using code blocks after a list
<xsl:apply-templates select="data/navigation"> <xsl:with-param name="area" select="'main'" /> </xsl:apply-templates>
the reason why I have the area param is b/c i applied this same template to my main menu at the top of the page and then my footer at the bottom. I only wanted my sub nav to be produced on my main menu. so by specifiying the area param, i was able to achieve this result.
towards the bottom of the navigation.xsl file, you'll see this recursive call:
<xsl:if test="page and $area = 'main'">
this asks if there are anymore children of the current node with the name page and if the $area is the main (menu) area. if both of these parameters are met, then reapply the page template (<xsl:template match="page">) with the next two parameters: area (same as above) and parent. this is merely to build out the correct url string.
i didn't test this out for multiple levels, only on the first sub nav level. But the logic seems like it should work as long as the children nodes are named page.
note - line 27, if you want the admin menu to show up, replace THE_USER_NAME with the appropriate user name.
hope this helps.
Create an account or sign in to comment.
Hi,
after I got this thing working, I like it! But what I'm still missing is a possibility to make submenu points. Did I missed something or is it not possible yet? Is there an extension for it?
Thanks leerraum