Static text in navigation tree

Hi everyone,

I'm trying to reproduce a certain behaviour using Plone. I'd like to create a separator (a static text) between items in the navigation tree. I'm aware I could do it using collections but I actually need it to be done using the navigation tree because that allows me to highlight the current page in the tree.

The separator is not meant to be navigatable but I have tried creating a custom content type using Dexterity and make it show in the navigation. Easy but I cannot distinguish those from other items in the list except by their names, which is not good since then I cannot style the item accordingly based on their names only.

I'm no good with Python so any help will be much appreciated.

Just to increase the knowledge base, I just designed a solution for my problem.

As mentioned before, I created a custom content type using Dexterity so it would show in the navigation menu. At first I didn't see any indication of the type of the content but I've just found the <a> has a class that distinguishes these static text elements as "contenttype-static_title". The solution to presenting it as an actual static text lies in the theme. Under the rules for the theme, I placed this code:

<replace css:content=".navTree li a.contenttype-static_title">
   <h3><xsl:value-of select="." mode="raw"/></h3>
</replace>

In this case, I wanted to present the static title as an <h3> but one could replace with anything. And that's it, the static titles will be shown in the navigation tree right where you place them.

Just to note, I hadn't noticed any tags in the <a> element but I also had disabled showing icons in the navigation tree. If the class does not show up, maybe it will only when the navigation tree is set to show icons (I don't actually show them, but it works for me).