help creating a dynamic nav with DLs, DTs, and DDs
Hello I have a requirement to create a nav using definition lists. Im having some problems a) getting my current nav code to work as is, and b) getting the dt and dd tags working in it. My folder structure is as below, the same navigation has to appear on every page.
The following code doesnt render the second level child elements on the first page only on the sub pages., i think it has to do with select="./ *[@isDoc. When it does load it loads a li>ul>li> structure, whereas i would like a <dt> for headers and <dd> for the sub links.
Has anyone got any ideas where I am going wrong. Should i have used a for each instead?
The navigation is set to start from your $siteRoot variable, which is set to start at "$currentPage/ancestor-or-self::* [@level=2]" - which means either the current page (if it's level is 2) or it will walk up the tree for the first level 2 ancestor. So in this case it would not show at all on a level 1 node, since that condition won't be hit.
No Luck Tom, this section of the site starts at level2, but even if i change it to level1 its still not lisiting all of the navigation pages in one go, only when i click through.
help creating a dynamic nav with DLs, DTs, and DDs
Hello I have a requirement to create a nav using definition lists. Im having some problems a) getting my current nav code to work as is, and b) getting the dt and dd tags working in it. My folder structure is as below, the same navigation has to appear on every page.
The following code doesnt render the second level child elements on the first page only on the sub pages., i think it has to do with select="./ *[@isDoc. When it does load it loads a li>ul>li> structure, whereas i would like a <dt> for headers and <dd> for the sub links.
Has anyone got any ideas where I am going wrong. Should i have used a for each instead?
Hi,
The navigation is set to start from your $siteRoot variable, which is set to start at "$currentPage/ancestor-or-self::* [@level=2]" - which means either the current page (if it's level is 2) or it will walk up the tree for the first level 2 ancestor. So in this case it would not show at all on a level 1 node, since that condition won't be hit.
I would suggest changing to:
Also, to implement the dl/dt/dd, simply change the markup in your code that is currently writing ul/li
Hope this helps,
Tom
No Luck Tom, this section of the site starts at level2, but even if i change it to level1 its still not lisiting all of the navigation pages in one go, only when i click through.
Hi,
Can you paste your entire XSLT? I think there may be an issue with the way you are calling that template.
-Tom
Here you go Tom, thanks
Ive got my link structure working, just need to convert this to dl, dt and dds. Has anyone done this?
Hi,
Glad you got it working! To change to dl/dt/dd can't you just simply change your <ul> to <dl> etc?
-Tom
Tom, i dont think its as simple as that. The problem im facing it the above template renders the imformation
Whereas i want it to render as
I solved it, see above
is working on a reply...