Developer forum

Forum » Templates » xslt currentpage as startlevel?

xslt currentpage as startlevel?

Dmitrij Jazel
Reply
 Hello DW guys,

Wanted to ask you a question here.
Lets say, you have a 3 level menu, and when you are on the 1st level, you can see all the children.
with this:
<ul class="dwnavigation" id="SubNavigation" settings="startlevel:1;endevel:99;template:LIClean.xslt;expandmode:All;" >
And if you are in the 2nd level and you want to see clindren from 2nd level you write this:
<ul class="dwnavigation" id="SubNavigation" settings="startlevel:2;endevel:99;template:LIClean.xslt;expandmode:All;" >
But is it possible somehow to tell that I want to use current page level as startlevel? So I could reuse the menu all over the place in one template.

Regards,
Dmitrij
 

Replies

 
Dmitrij Jazel
Reply
This post has been marked as an answer
I found the solution here:
Just add one more parameter to the settings:
settings="parentid:236; other patameters here..."
Where you tell the id of the page that you want to list navigation

Votes for this answer: 0
 
Dmitrij Jazel
Reply
Hi again,

Well but this value is Hard-coded
So you can't use this if you want this current actual page as parent ID - there should be a way to tell this setting or XSLT file that the ParentID is the ID of the current page...

Any way to do that without much pain? :-)

Kind regards,
Dmitrij

 

You must be logged in to post in the forum