Topic Closed
214 Posts
3 Themes
8 Plugins

I am looking for a solution to add a specific class to each li-Element in the Pagemanger.

My proposal is to add this possibility under 'More options'.

nth-child and nth-type are possibilities - but if the tree is changed then the css has to be changed as well

3 years ago#10044

1.4K Posts
16 Plugins
design, web development & visual effects

Hooking into Typesetter's menu rendering is tricky. I tried once but couldn't find a good solution at plugin level.
Your proposal to define additional CSS classes in More Options is a good idea. Let's keep it in mind but I fear there will not be a solution short-term.

nth-child actually is no good solution for your mentioned reasons but you can  ...

1) target the anchor inside the li using

.navbar-nav a[title="Child Page"] {
  /* some styles */


2) use javascript to add classes to the parent li using the same selection method by adding sth. like th following to template.php:

$page->jQueryCode .= '
$(".navbar-nav a[title=\'Home\']").closest("li").addClass("home-class");
$(".navbar-nav a[title=\'Child Page\']").closest("li").addClass("childpage-class");

While using JS is not exactly beautiful and editing template.php for this purpose is cumbersome, it will work.

Edited: 3 years ago#10047

Topic Closed



Typesetter 5.1

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In