Developer forum

Forum » Templates » Dividers mellem menupunkter

Dividers mellem menupunkter


Reply

Hej i kloge hoveder. Jeg har brug for jeres ekspertise.


 


Jeg har på denne side: http://contex.net.dynamicweb.dk/ en menu i bunden. Jeg vil gerne have adskildt menupunkterne med dividers (border-right på LI forestiller jeg mig) og det er i og for sig også nemt nok. MEN der skal ikke være en divider efter det sidste menupunkt. Menuen er XSLT og det er jeg ret dum til, så hvordan får jeg identificeret det sidste punkt, så jeg kan tage en border-right af det?


 


Venlig hilsen


Iben Louise


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Iben


 


Make a test to se if an item is the last:



 


You can do something like this (Yellow block added to the LIClean.xslt):


 






  • LastItem



















  •  
    Reply

    Hmmm... it doesn't work :(


     


    Ideas anyone?


     


    Iben Louise

     
    Nicolai Høeg Pedersen
    Reply

    Hi Iben


     


    I'm pretty sure you have to do something like that. Please mail me a link of the site you are working on and whate pagetemplate/menu - i'll take a look and post the solution here.

     
    Reply
    NP wrote:





    Hi Iben








     








    I'm pretty sure you have to do something like that. Please mail me a link of the site you are working on and whate pagetemplate/menu - i'll take a look and post the solution here.










    Try this one:



       lastitem


     
    Reply
    NP wrote:


    Hi Iben




     




    I'm pretty sure you have to do something like that. Please mail me a link of the site you are working on and whate pagetemplate/menu - i'll take a look and post the solution here.





    Thanks :) What's your mail-adress?


     


    /Iben Louise

     
    Nicolai Høeg Pedersen
    Reply

    Hi Iben


     


    For the record:


    Both of the suggestions works fine:


     



    lastitem



     


    And from Dammark:



    lastitem



     


    Both of them result in markup like this:



     


    What you did not do though, was extending your CSS to remove the | marker right of the lastitem. So add the following to your CSS and you are done.


     


    #footer ul li.lastitem {

     border-right: 0px solid #ffffff;

    }

     
    Reply

    Thank you so much. You are a star :D


     


    /Iben Louise

     

    You must be logged in to post in the forum