Hi,
I have searched through the forums and found a couple of solutions to my question, but not really quite what I need. I have a very lengthy amount of page content that needs to be separated into several pages. I wanted to include "previous" and "next" with also "page 1 of 5", "page 2 of 5", etc. for the sibling pages.
I pieced together the following code for this purpose:
<div>
<div>
{$cgsimple->get_sibling("prev","prev_sibling")}
{if !empty($prev_sibling)}
{cms_selflink page="$prev_sibling" text="Previous Page"} :: {page_attr key="extra1"} of 5
{/if}
{$cgsimple->get_sibling("next","next_sibling")}
{if empty($prev_sibling)}{page_attr key="extra1"} of 5 :: {cms_selflink page="$next_sibling" text="Next Page"}
{elseif !empty($prev_sibling) AND !empty($next_sibling)} :: {cms_selflink page="$next_sibling" text="Next Page"}
{elseif !empty($next_sibling)}{cms_selflink page="$next_sibling" text="Next Page"}{/if}
</div>
</div>
My questions are:
1. Is there a different, or easier way to do this?
2. How do I write in for the smarty to count the sibling pages, so I could apply this more broadly?
(I'm not very good at writing smarty) I appreciate any input or suggestions. Thank you! Camille
Smarty and page count navigation
Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Let us know here.
Jump to
- Official Boards
- ↳ README FIRST!!!
- ↳ Announcements
- ↳ General Discussion
- Support Boards
- ↳ CMSMS Core
- ↳ Modules/Add-Ons
- ↳ Help Wanted (commercial)
- ↳ Translations
- Community Boards
- ↳ Tips and Tricks
- ↳ CMS Show Off
- ↳ Layout and Design (CSS & HTML)
- ↳ Feature ideas
- ↳ Developers Discussion
- ↳ The Lounge
- International Discussions
- ↳ Czech/Slovak - Česky/Slovensky
- ↳ Danish - Dansk
- ↳ Dutch - Nederlands
- ↳ Aankondigingen
- ↳ Tips en Trucs
- ↳ Vertalingen & Documentatie
- ↳ Hulp gezocht (commercieel)
- ↳ Finnish - Suomi
- ↳ French - Français
- ↳ German - Deutsch
- ↳ BITTE ZUERST LESEN !!!
- ↳ Ankündigungen
- ↳ Installation und Einstellungen
- ↳ Module und Tags
- ↳ Smarty-Tipps und -Tricks
- ↳ Layout und Design
- ↳ Suchmaschinenoptimierung (SEO)
- ↳ HowTo's
- ↳ Übersetzungen
- ↳ Show Off
- ↳ Hilfe gesucht (kommerziell)
- ↳ Stammtisch
- ↳ Hungarian - Magyar
- ↳ Italian - Italiano
- ↳ Moduli/Plugins
- ↳ Lithuanian - Lietuviškai
- ↳ Darbo / bendradarbiavimo pasiūlymai ir paieška
- ↳ Persian / Farsi
- ↳ Polish - Polski
- ↳ Portuguese - Português
- ↳ Russian - русский
- ↳ Предложения и поиск РАБОТЫ
- ↳ Spanish - Español
- ↳ Swedish - Svenska
- Geekmoot Editions
- ↳ Geekmoot 2016
- ↳ Connections and Conversations
- ↳ Geekmoot 2015
- ↳ Geek Moot 2012
- ↳ Locked: Geek Moot 2010
- Old Forums
- ↳ [locked] CMSMS 2.0 Beta
- ↳ Module Developers
- ↳ Closed Issues
- ↳ [locked] Documentation0ld
- ↳ Suggestions, Modifications & Corrections
- ↳ [locked] CMSMS 1.11 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 1.10 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 2.2 Beta
- ↳ [locked] CMSMS MLE fork
- ↳ Modules/Addon patchs
- ↳ [locked] Quality Assurance
- ↳ [locked] Accessability and Usability
- ↳ [locked] Documentation
- ↳ Media and presentations about CMSMS
- ↳ [locked] Installation, Setup and Upgrade