Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I´m having a problem with my treemenu. I wan´t to style my vertical menu with CSS3 and JS. But I can't give my submenus a specific number with . (see my menu strukture on the images below)
Is there another way to do it ? - PLEASE HELP ME
Is it because you set
<xsl:attribute name="class">child</xsl:attribute>
And that overrides your class namer on your li's?
Otherwise I'm not sure where you are trying to put in a number?
Your basic structure is rather OK actually,
I can't take credit for it. _When I have started at this company, they already had the website up and running. I am completely new to Umbraco.
What is the right way to do it ?
Lasse Link to the page : http://hsasystems.com/about-us.aspx
I wood like to put a number on my submenus. So it's easier to style
Like this :
<ul> <li class="submenu1"><a href="#">Something</a></li> <li class="submenu2"><a href="#">Info</a></li> ect. </ul>
Hi Lasse,
It looks like you just need two small modifications (provided the rest works as expected):
Set a default for the level parameter to make sure it starts at one if you don't explicitly set it:
<xsl:param name="level" select="1" />
And add the level to the class:
<li class="submenu{$level}">
/Chriztian
That helped, but now they all named <li class="submenu3"> Why???
<li class="submenu3">
Ah - okay - my bad; I misunderstood :)
Use the position() function to grab the index for the current item in a for-each:
position()
<li class="submenu{position()}">
Hep,
try this:
<xsl:for-each select="[your select statement]"> <li class="submenu{position() + 1}"> [alt dit andet indhold] </li> </xsl:for-each>
Damn you Chriztian... Too fast :-)
Thank you so much - You just saved my day
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Problem with submenu with a specific number
Hello Everybody
I´m having a problem with my treemenu. I wan´t to style my vertical menu with CSS3 and JS. But I can't give my submenus a specific number with . (see my menu strukture on the images below)
Is there another way to do it ? - PLEASE HELP ME
Is it because you set
And that overrides your class namer on your li's?
Otherwise I'm not sure where you are trying to put in a number?
Your basic structure is rather OK actually,
Tak Mads
I can't take credit for it. _When I have started at this company, they already had the website up and running. I am completely new to Umbraco.
What is the right way to do it ?
Lasse Link to the page : http://hsasystems.com/about-us.aspx
I wood like to put a number on my submenus. So it's easier to style
Like this :
Hi Lasse,
It looks like you just need two small modifications (provided the rest works as expected):
Set a default for the level parameter to make sure it starts at one if you don't explicitly set it:
And add the level to the class:
/Chriztian
Thanks Chriztian
That helped, but now they all named
<li class="submenu3">
Why???Hi Lasse,
Ah - okay - my bad; I misunderstood :)
Use the
position()
function to grab the index for the current item in a for-each:/Chriztian
Hep,
try this:
Damn you Chriztian... Too fast :-)
TUSIND TAK DRENGE.
Thank you so much - You just saved my day
:-D
is working on a reply...