Developer forum
E-mail notifications
XML menu handling
For example, I have a project were I will have a section with 8 different pages. So if I create a menu Dynamicweb web will handle it vertically or horizontally.
What I need is a way to control a specific menu. I want to have the only 4 elements by line.
Something like:
Menu1 Menu2 Menu3 Menu4
Menu5 Menu6 Menu7 Menu8
Is it possible?
Replies
ralencastre wrote:
Hi! I would like to know how can if I can use the XML menus to handle how a menu will flow on the page?
For example, I have a project were I will have a section with 8 different pages. So if I create a menu Dynamicweb web will handle it vertically or horizontally.
What I need is a way to control a specific menu. I want to have the only 4 elements by line.
Something like:
Menu1 Menu2 Menu3 Menu4
Menu5 Menu6 Menu7 Menu8
Is it possible?
Hi Ricardo
Yes it is.
In XSLT you have alot of functions that you can use.
One of them is the position() function that can tell you your position in the XML tree. If this one is used with a simple modulus then you can do stuff at a specific position.
Example:
You can download the example here:
http://developer.dynamicweb.dk/Files/Filer/Developer/Examples/menu.xslt
I hope this was useful.
// Sebastian
Is it also possible to output a specific id to a li. What I want to do is pass the status text field from the pagesettings to a specific li.
For instance if have a page with the name about us and in my page status text have about i want "about" passed to a li so it is called li id="about".
I cant figure it out
cbud@stibo.com wrote:Is it also possible to output a specific id to a li. What I want to do is pass the status text field from the pagesettings to a specific li.
For instance if have a page with the name about us and in my page status text have about i want "about" passed to a li so it is called li id="about".
I cant figure it out
Hi Casper
What you want is to get the first word of a string ?
This can be done like this:
$string must then be declared as a variable which contains the complete sentence
// Dammark
You must be logged in to post in the forum