DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT: Prev-Next Paging for Pages and Extension-Detailviews¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2011-05-04T11:29:01.310000000 |
Classification: | mbkdprevnextpaging |
Description: | Easy to handle and comfortable Extension for prev-next paging for pages and extension detailviews. To include this extension for pages every person can do this. To include this extension for extension detailviews, you need a bit of programmers knowledge, because you habe to determine the correct extension detailview get-variable and SQL for extension listing. |
Keywords: | prev next paging paginator link pages extension detailview |
Author: | Markus Brunner, Katja Deutschmann |
Email: | mail@markusbrunner-design.de |
Extension-Support: | |
Markus Brunner | |
URL: | http://www.markusbrunner-design.de, http://www.katjadeutschmann.de |
Language: | en |
EXT: Prev-Next Paging for Pages and Extension- Detailviews - mbkdprevnextpaging
EXT: Prev-Next Paging for Pages and Extension-Detailviews¶
Extension Key: mbkdprevnextpaging
Language: en
Keywords: prev next paging paginator link pages extension detailview
Copyright 2000-2008, Markus Brunner, Katja Deutschmann, <mail @markusbrunner-design.de>
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.org
Table of Contents¶
EXT: Prev-Next Paging for Pages and Extension-Detailviews 1
`Introduction 3 <#Introduction|outline>`_
`Users manual 5 <#Users%20manual|outline>`_
Prev-Next Paging Plugin-Configuration for pages 5
Prev-Next Paging Plugin-Configuration for extensions 5
`Administration and Configuration 8 <#Administration%20and%20Configuration|outline>`_
`Known problems 10 <#Known%20problems|outline>`_
`ChangeLog 11 <#ChangeLog|outline>`_
Introduction¶
What does it do?¶
Includes a prev-next paging for pages (include on each page, where it should be displayed) or extension detailviews (include once on extension detailview page with extension mode). Design can easily be styled via css. HTML-Structure can be overwritten with own html- template.
Users manual¶
Prev-Next Paging¶
After installation of the extension in the Extension Manager, you can insert the Prev-Next Paging(pi1) on each page as a Content Element.
Prev-Next Paging Plugin-Configuration for pages¶
Setup for pages is very easy. Just include the plugin on each page and choose whether you want dynamic names or not:
Prev-Next Paging Plugin-Configuration for extensions¶
Setup for extensions is more complex and you'll need some programmers knowledge. First choose Mode 'Paging for extension-detailviews (included once on the extension-detail-page)' and determine whether names should be produced dynamic (you'll then need a title resulting in your SQL → see below):
After that, change to Plugin-Tab 'Extension-Mode' and fill out all fields correctly:
1. (optional) Insert your main-database-table in the first field. It is used for replacing the ###ENABLEDIELDS### marker in your SQL-Query. Otherwise leave blank!
2. The Get-Var ist the identifier of your extension-detailview-record. In the extension mbwikifileknowledgebase this is tx_mbwikifileknowledgebase_pi1[uid], which therfore represents the uid of the article-record. This is needed to determine the current record out of the following SQL-result. If you fill out an incorrect variable, it's not possible to determine the correct previous and following record.
3. (optional) Insert the Get-Var of your category. In the extension mbwikifileknowledgebase this is tx_mbwikifileknowledgebase_pi1[category]. This is used to build the links. For this you also need to get the actual category_uid in your query (… AS category_uid). If you do not need the category in your link, leave this field blank!
4. In the SQL-field you have to insert a correct SQL-Query to get all records which are also shown in the list-view of the extension. In the case of mbwikifileknowledgebase this would be:
SELECT
tx_mbwikifileknowledgebase_fileindex.uid AS uid,
tx_mbwikifileknowledgebase_fileindex.navtitle AS title,
tx_mbwikifileknowledgebase_fileindex.foreign_category AS category_uid
FROM tx_mbwikifileknowledgebase_fileindex
LEFT JOIN tx_mbwikifileknowledgebase_categories
ON tx_mbwikifileknowledgebase_fileindex.foreign_category = tx_mbwikifileknowledgebase_categories.uid
WHERE
tx_mbwikifileknowledgebase_fileindex.sys_language_uid = ###SYS_LANGUAGE_UID###
AND (
###GET###tx_mbwikifileknowledgebase_pi1[category]###0###/GET### = tx_mbwikifileknowledgebase_fileindex.foreign_category
OR
###GET###tx_mbwikifileknowledgebase_pi1[category]###0###/GET### = 0
)
###ENABLEFIELDS###
ORDER BY tx_mbwikifileknowledgebase_fileindex.navtitle ASC
For a very simple extension it could be:
SELECT
uid,
name AS title
FROM
tx_extension_table
WHERE
sys_language_uid = ###SYS_LANGUAGE_UID###
###ENABLEFIELDS###
ORDER BY name ASC
As you can see, it is possible to manage normal language-support of extensions with the placeholder ###SYS_LANGUAGE_UID###, which is therefore replaced in the extension with the correct current sys_language_uid ($GLOBALS['TSFE']->sys_language_uid).
###ENABLEFIELDS### is replaced with the enable-fields-properties of your main-table you can fill in, in field “Table for which you want to include the enablefields-Function in your SQL-Query (optional - replaces ###ENABLEFIELDS### in SQL)”.
Furthermore you have the possibility to insert current get-vars with the following syntax: ###GET### VARIABLE ### DEFAULT_VALUE ###/GET### e.g.: ###GET###mayvariable[id]###0###/GET### or ###GET###mayvariable2###0###/GET###. These phrases are filtered with a regular expression. So if you make any mistake in the syntax it won't be parsed correct.
If filled out correctly the output for the following examples would be:
For http://www.domain.de/projects/project1.html?mayvariable[id]=1& mayvariable2=4
###GET###mayvariable[id]###0###/GET### => 1
###GET###mayvariable2###0###/GET### => 4
###GET###mayvariable3###0###/GET### => 0 (not present in GET-Vars => default!)
If you need to get string-variables for your SQL this would normally be no problem, but of course you have to insert quotes “” around get GET-Var in your SQL:
SELECT uid AS uid, title AS title FROM myextensiontable WHERE stringcol = “###GET###mayvariable[id]###0###/GET###” AND sys_language_uid = ###SYS_LANGUAGE_UID### AND deleted = 0 AND hidden = 0
Administration and Configuration¶
This Extension produces no own database-tables.
((generated))¶
TypoScript¶
Extension TypoScript-Setup for “plugin.tx_mbkdimagelightbox_pi1.”
wrapInBaseClass¶
Property
wrapInBaseClass
Data type
integer
Description
Choose if the frontend plugin is wrapped with the standard extension wrapper: '<div class=”tx_mbkdprevnextpaging_pi1”>|</div>'.
0 = disable wrapping
1 = enable wrapping
Default
0
innerWrap¶
Property
innerWrap
Data type
wrap
Description
wrap within wrapInBaseClasse.g. innerWrap = <div class="prevnextpaging">|</div>
Default
Template¶
Property
Template
Data type
string -> path
Description
overwrite std. template file:
1. copy std. template for correct markers: EXT:mbkdprevnextpaging/res/template.tpl
- overwrite template file e.g. with:
template = fileadmin/templates/prevnext.tpl
Default
usedefaultcss¶
Property
usedefaultcss
Data type
integer
Description
Use of default CSS for Prev-Next-Pager-Links
0 = no CSS included
1 = default CSS included
Default
1
separator¶
Property
separator
Data type
string
Description
separator between prev and next, if both availablee.g. separator = <span class="separator">|</span>
Default
contentafterlinks¶
Property
contentafterlinks
Data type
string
Description
Normally for printing <br style="clear:both" /> after links for floating
Default
<br style="clear:both" />
excludeUIDs¶
Property
excludeUIDs
Data type
integers, comma-separated
Description
Here you can add page-ids, which should not appear in the paging (e.g. 1,23,5)
Default
languageParam¶
Property
languageParam
Data type
string
Description
TYPO3-Language Parameter; typically “L”
Default
L
pageModeDoktypes¶
Property
pageModeDoktypes
Data type
Integers, comma-separated
Description
pageMode: doktypes to select (1 = normal page, 4 = internal link; to select all "pageModeDoktypes = 1,4")
Default
1
_LOCAL_ LANG.langKey.label¶
Property
_LOCAL_ LANG.langKey.label
Data type
string
Description
Overwrite of language labels like in all well made extensions → you can overwrite all labels found in EXT:mbkdprevnextpaging/pi1/locallang.xml
Default
Standard Template:
# Default Values for plugin.tx_mbkdprevnextpaging_pi1
plugin.tx_mbkdprevnextpaging_pi1 {
# wrap of links with default extension wrapper
# <div class="tx-mbkdprevnextpaging-pi1">|</div>
# needed for default css
wrapInBaseClass = 1
# wrap within wrapInBaseClass e.g. <div class="prevnextpaging">|</div>
innerWrap >
# overwrite std. template file (e.g. with fileadmin/templates/prevnext.tpl)
# copy std. template for correct markers! EXT:mbkdprevnextpaging/res/template.tpl
template >
# activation of default css
usedefaultcss = 1
# separator between prev and next, if both available e.g. <span class="separator">|</span>
separator >
# print <br style="clear:both" /> after Links for floating
contentafterlinks = <br style="clear:both" />
# page-ids to exclude from navigation (comma separated values e.g. 1,23,5)
excludeUIDs >
# language Parameter (GET-Param-Name) - usually this is "L"
languageParam = L
# pageMode: nav_hide -> show also pages which are hidden in menues in TYPO3-Backend
pageModeshowAlsoNavHiddenElements = 0
# pageMode: doktypes to select (1 = normal page, 4 = internal link; to select all "pageModeDoktypes = 1,4")
pageModeDoktypes = 1
# language overwrite of EXT:mbkdprevnextpaging/pi1/locallang.xml
/*
_LOCAL_LANG {
# english
default {
prev_dynamic = to "
prev_dynamic_end = "
prev_page = previous page
prev_extension = next
next_dynamic = to "
next_dynamic_end = "
next_page = next page
next_extension = next
of_title = of
}
# german
de {
prev_dynamic = zu "
prev_dynamic_end = "
prev_page = vorherige Seite
prev_extension = vorherige(r)
next_dynamic = zu "
next_dynamic_end = "
next_page = nächste Seite
next_extension = nächste(r)
of_title = von
}
}
*/
}
Template¶
File: EXT:mbkdprevnextpaging\res\template.tpl
Copy it and define destination with TS plugin.tx_mbkdprevnextpaging_pi1.template if you want to make changes!
special markers for links:
###PREV_NUMBER### ###NEXT_NUMBER### ###OF_TITLE### ###ALL_COUNT###
<!-- ###PREV_LINK_TEMPLATE### begin-->
<a class="prev" href="###PREV_LINK###">< <span>###PREV_TITLE###</span></a>
<!-- ###PREV_LINK_TEMPLATE### end-->
<!-- ###NEXT_LINK_TEMPLATE### begin-->
<a class="next" href="###NEXT_LINK###"><span>###NEXT_TITLE###</span> ></a>
<!-- ###NEXT_LINK_TEMPLATE### end-->
Known problems¶
None, yet.