NAVIGATION
It is possible to paginate articles in list view, e.g. display 3 of 6 existing articles on one page and the other 3 on the next page.
Docu: –
Forum: Artikel Paginieren
Forum: Articlelisting zweispaltig
Author: K.Heermann (flip-flop) http://planmatrix.de 2009/12/25
CMS Version: >= V1.3x
Version: V1.0
Update: –
Tag: –
Filename: conf.template_default.inc.php
Folder: /config/phpwcms/
Condtion: –
Adoption: 6 Articles existing, 3 to display per page.
ADMIN → site structure → category
For this it is displayed a separate Navigation if pagination is turned on.
This menu is configured in the file /config/phpwcms/conf.template_default.inc.php:
// Original // $template_default['article_paginate_navi'] = '<div class="paginate paginate-{POS}">{PREV:«} {NEXT:»} page #/##, result ###-####, {NAVI:1-3, |<span>|</span>}</div>'; // {NAVI:123, // Little play $template_default['article_paginate_navi'] = '<div class="paginate paginate01-{POS}"> [ {PREV:«} -- {NEXT:»} ] [Seite (page) # von (off) ##] [Resultat (result) ###-####] [{NAVI:1-3,> ↔ <|<span><|></span>}]</div>'; // {NAVI:123, $template_default['article_paginate_show'] = 'top bottom rt{RT}'; //where should the navi be shown - possible values: top and/or bottom and/or rt:{RT}
/* Article pagination -------------------- */ div.paginate{ width: 603px; height:16px; border: 1px solid #ccc; margin-bottom: 5px; font-size: 110%; } div.paginate-top{ background: yellow; } div.paginate-bottom{ background: lightgreen; clear: both; } /* Little play --------------- */ div.paginate01-top{ background: gold; } div.paginate01-bottom{ background: aquamarine; clear: both; }
$template_default['article_paginate_navi'] = ' <div class="article_paginate_navi"><div class="apn_prev">{PREV:« zurück «}</div><div class="apn_mid">Seite # von ##</div><div class="apn_navi">- {NAVI:123, - |<span style="color:#555">|</span>} -</div><div class="apn_next">{NEXT:» nächste »}</div></div><br class="clear" />'; // $template_default['article_paginate_show'] = 'rt{ART_PAGI_NAV} top bottom'; // top bottom rt{RT} where should the navi be shown - possible values: top and/or bottom and/or rt:{RT}
The self created tag {ART_PAGI_NAV} is a replacer for the pagination navigation.
The tag can be placed anywhere in the template, at which the pagination Navi is to stand.
/* --------- article pagination ----------- */ .article_paginate_navi { font-family: verdana, arial, sans-serif; font-size: 11px; background: #fff url(../../picture/navi02/article_navi.jpg) no-repeat left top ; color: #444; margin: 21px 0 0 0; padding: 3px 15px 0 15px; height: 20px; } .article_paginate_navi a { color: #1E3F82; font-weight: bold; text-decoration: none; } .article_paginate_navi a:hover { color: #D74600; font-weight: bold; text-decoration: none; } .apn_prev { float: left; color: #555; margin: 0; padding: 0 20px 0 0; } .apn_mid { float: left; color: #888; margin: 0; padding: 0 0px 0 30px; } .apn_navi { float: left; color: #D74600; margin: 0; padding: 0 0 0 60px; } .apn_next { float: right; color: #555; margin: 0; padding: 0 0px 0 20px; }
Adoption: The content of the enclosing container has a width of 700px.
The containers for each article have a width of 300px. With float: left; now we lined the containers to each other, until the width dimension of the surrounding container is reached.
(See pictures above (“front output”).
Filename: list_float01.tmpl
Folder: /template/inc_cntpart/articlesummary/list/
[SPACE]<!-- space //-->[/SPACE] <div class="phpwcmsArticleListEntry-float"> [IMAGE]<div class="phpwcmsArticleListImage"> [ARTICLELINK]<a href="{ARTICLELINK}"{TARGET}>[/ARTICLELINK]{IMAGE}[ARTICLELINK]</a>[/ARTICLELINK] [CAPTION]<div class="phpwcmsArticleListImageCaption">{CAPTION}[COPYRIGHT] <span class="copyright">{COPYRIGHT}</span>[/COPYRIGHT]</div>[/CAPTION] </div>[/IMAGE] [TITLE]<h1>{TITLE}</h1> [/TITLE][SUB] <h3>{SUB}</h3> [/SUB][SUMMARY] <div><strong>{DATE:j. F Y lang=DE}</strong> {SUMMARY}</div> [/SUMMARY][MORE] <div class="phpwcmsArticleListMore"><a href="{ARTICLELINK}"{TARGET}>{MORE}</a></div>[/MORE] </div>
/* Article list --------------------------- */ .phpwcmsArticleListEntry { clear: both; } /* Article list float --------------- */ .phpwcmsArticleListEntry-float { float: left; width: 288px; height: 170px; border: 1px solid #ccc; background: #eee; padding-left: 10px; margin: 0 5px 5px 0; } .phpwcmsArticleListImage { float: left; margin-right: 10px; margin-bottom: 10px; padding-top: 3px; } .phpwcmsArticleListImageCaption { padding-top: 5px; } /* ---------------------------------------- */