Jump to content

Tom Tom

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Tom Tom

  1. Thanks for all the responses, I tried the code above and worked perfectly!
  2. Hi, This a total newbie question, but how can I modify the code below so that a specific css class (.last) is added to the last <li>? <?php $homepage = $pages->get("/"); $children = $homepage->children; $children->prepend($homepage); foreach($children as $child) { $class = $child === $page->rootParent ? "class='active'" : ''; echo "<li $class ><a href='{$child->url}'>{$child->title}</a></li>"; } ?>
×
×
  • Create New...