Jump to content

Search the Community

Showing results for tags 'sibling'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 3 results

  1. My site structure is something like this: parent item 1 --sibling --sibling --sibling --sibling parent item 2 parent item 3 Within parent item 1, I have a menu that navigates to each sibling page like this: <nav> <ul id="pages"> <li><a class="previous" href="<?php echo $page->prev->path; ?>">prev</a></li> <li><a class="next" href="<?php echo $page->next->path; ?>">next</a></li> </ul> </nav> What I would like to do is change my li class when ever a user would get to the first and last sibling page. Does anyone know how I can do that?
  2. Sorry, should be something basic but can't seem to find the answer in here. If I want a section with a header ie: (Other news articles) to display only if the page has siblings, how would I go about checking that in an if statement? I have tried: if ($page->siblings) if ($page->siblings()) if ($page->siblings->id) if ($page->siblings.count > 0) I find myself always guessing at the different ways on testing whether or not something is empty or does not exist. Is there a general rule? This might help me clarify when to use which of the above! Thanks guys.
  3. Was just wondering about the best way to show a list of siblings (in this case other news articles) in the sidebar without also showing the current page article? Currently I have this but not sure on how to "offset" the current page: <?php $siblings = $page->siblings(); foreach ($siblings as $sibling) { ?> <li><a href="<?php echo $sibling->url; ?>"><?php echo $sibling->title; ?></a></li> <?php } ?>
×
×
  • Create New...