EXT: Page Navigation

Extension Key: gsi_pagenav

Copyright 2003-2004, Martin Kutschker, <Martin.T.Kutschker@blackbox.net>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: Page Navigation	1

Introduction	1

What does it do?	1

Users manual	1

Administration	1

Behaviour on “Not in menu” pages	2

Ignoring “Shortcut” pages	2

Configuration	2

Reference	2

Constants	2

Registers	2

Adding to a page template	2

To-Do list	3

Changelog	3

Introduction

What does it do?

Provides a new menu content element that acts as a prev/next navigation as it is seen on many sites in “articles”. May also display information of the kind “page # of nnn”.

Users manual

Select the type Menu/Sitemap for a new content element and choose “Page navigation (prev/next)” as the menu type.

If the page is of type “Not in menu” then the navigation will be relative to the parent of the page. This makes sense as it allows the menu to appear on an “answer page” of a form. This behaviour may be suppressed by the site administrator (so links behave normal on “not in menu” pages).

Note:
Startingpoint is ignored.

Administration

Labels for previous, next

Wraps for the labels

Separator / page counter

Wrap for the whole navigation

Via the constants editor you may configure the labels to be used for the “buttons”. Default are “Previous” and “Next”. If you leave the labels blank, the title of the pages are used for the links instead. If you like you can style the labels with wraps.

A separator and a wrap for the whole navigation element may be defined as well.

The separator may be enabled to act as a “page counter” (“page # of nnn”). In this case you may use the markers ###NR### and ###TOTAL### in the separator, which may be padded with leading zeroes. It will also be shown on all pages (the normal separator is only visible when both a previous and next page exist).

Tip: If you leave the labels empty but use wraps, you can have both the page title and a literal “previous”/“next”:

plugin.gsipagenav.prev.wrap = << previous |

plugin.gsipagenav.next.wrap = | next >>

Behaviour on “Not in menu” pages

Per default the navigation is relative to the parent page. You can make the navigation “local” to the current menu level by choosing the local “not in menu”-page-navigation option. If you set it, the behaviour is the same as on normal pages.

Ignoring “Shortcut” pages

The plugin may be configured to ignore shortcuts. They will not be linked as next/prev and they will not be counted (in page counter mode).

Configuration

Not much to configure but the TypoScript of the contents.

Reference

Property:	Data type:	Description:	Default:
content	cObject	The contents of the menu. You may use constants and register values to create your own cObjects	COA
excludeDoktypes	string	Other document types to ignore. Shortcuts and not-in-menu are handled separately, BE user sections, spacers and all system types are excluded by default.	3,7

Constants

Page counter mode (boolean):

$plugin.gsipagenav.counter

Local not-in-menu mode (boolean):

$plugin.gsipagenav.localnotinmenu

Ignore shortcuts (boolean):

$plugin.gsipagenav.ignoreshortcuts

Number of leading zeroes of page counter (integer):

$plugin.gsipagenav.zeroes

Labels (strings):

$plugin.gsipagenav.prev

$plugin.gsipagenav.next

$plugin.gsipagenav.sep

Wraps (strings):

$plugin.gsipagenav.prev.wrap

$plugin.gsipagenav.next.wrap

$plugin.gsipagenav.content.wrap

Registers

register:prev_title

register:prev_pid

register:next_title

register:next_pid

register:page_nr

register:page_total

Adding to a page template

If you need the navigation on all pages you can do this. Simply add the plugin in the TypoScript template of your choice.

Examples

# 'classic' TS

page.100 < plugin.tx_gsipagenav_pi1

# Template Auto-parser

subparts.PREVNEXT < plugin.tx_gsipagenav_pi1

To-Do list

Add prefetch HTML headers:

<link rel="prefetch" href="{next}">

Let me know if you have some other ideas.

Changelog

0.6.0	optional exclusion of shortcuts (Magma).

0.5.0	exclude spacer and back end user section pages and honour the 'hide in menu' flag (Magma).

0.4.0	page counter – made possible by Magma.design

0.3.1	Added TS example (GSI).

0.3.0	“Local” links on “not in menu” pages; wraps for the links and the whole navigation (GSI).

0.2.3.	Initial public release (Global Spanking Industries).

EXT: Page Navigation - 3

EXT: Page Navigation

Article style navigation with a menu content element

Typo3 extension navigation

2004-01-14T15:52:51