weboftalent / prevnextsibling
Helper method and template to allow previous and next sibling integration easily
Installs: 19
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 3
Open Issues: 2
Type:silverstripe-vendormodule
Requires
- php: ~7.1
- silverstripe/cms: ^4
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-21 19:21:12 UTC
README
Maintainers
- Gordon Anderson (Nickname: nontgor) gordon.b.anderson@gmail.com
Introduction
This module provides convenience methods for previous and next siblings of a common parent. It is used for paging through a list of children items.
Installation
composer require "weboftalent/prev-next-sibling"
Usage
Previous Sibling
In a template call $PreviousSibling
<% with $PreviousSibling %><a href="$Link">$Title</a><% end_with %>
If there is no previous sibling the result will be blank and nothing will render.
NextSibling
In a template call $NextSibling
<% with $NextSibling %><a href="$Link">$Title</a><% end_with %>
If there is no next sibling the result will be blank and nothing will render.
##Requirements
- SilverStripe 4