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

3.0.1 2021-11-18 19:22 UTC

README

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