Jump to content

Lance O.

  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by Lance O.

  1. I've slightly modified the following code from the original found in the /site-default/head.inc file that is included in the installation of PW.

    The page I am viewing is a child of "/team/" but $class isn't being added. What in the code below is incorrect?



    $team = $pages->get( "/team/" );

    $children = $team->children;

    foreach( $children as $child ) {

    $class = $child === $page->rootParent ? " current-menu-item" : ''; // DOESN'T WORK

    echo '<li id="menu-item-' . $child->id . '" class="nav-' . $child->name . ' menu-item menu-item-' . $child->id . $class . '"><a href="' . $child->url . '">' . $child->title . '</a></li>';




  2. I know this is an older thread, but I would like to make a suggestion. When I set the status of a page to "Unpublished: Not visible on site," the page was still viewable.

    Until I found this thread, I didn't realize that an unpublished page remains viewable if I am logged into PW as an admin. My first thoughts were to think that this functionality did not work as expected.

    It might be helpful to include an "Unpublished" label near the "Edit" label that appears at the top of a page when viewing it in the context of the site.

  3. Can the title of the ProcessWire Forum latest posts feed be renamed? Currently the title of the RSS feed is "Latest Posts," which isn't very descriptive when viewed with dozens of other RSS feeds in my feed reader.


    • Like 2
  4. Wow, five responses to my question! Really impressive!

    Including a variable in a config file makes sense. But from the point of view of my clients, many will question why they can't modify the site title directly in the CMS. Giving them the ability to change it and other variables, even if they won't, is really important.

    Thanks for the welcome to the forum!

  5. I've seen references to the page title, but where in ProcessWire can I set the site title, and how do I include it in my templates?

    My total experience with ProcessWire is about two hours, but it looks very promising. I develop primarily in WordPress, but the "post" structure has proved itself to be limiting.

  • Create New...