Skip to content

Module to provide a next sibling and previous sibling method for templates

License

Notifications You must be signed in to change notification settings

nickjacobs/prev-next-sibling

 
 

Repository files navigation

Previous and Next Sibling

Module CIScrutinizer Code Quality Code Coverage Build Status codecov.io

Latest Stable Version Latest Unstable Version Total Downloads License Monthly Downloads Daily Downloads

codecov.io

Maintainers

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

About

Module to provide a next sibling and previous sibling method for templates

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 46.7%
  • Dockerfile 35.1%
  • Scheme 9.4%
  • Shell 8.8%