MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Sep 07, 2008, 01:49 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
modxcms.com
web
MODxCMS.com
Forums
Help
Login
Register
News
:Donate to MODx:
Donations
MODx Community Forums
»
Add-ons, Extensions & Elements
»
Creating & Repurposing Content
»
Ditto
(Moderators:
Mark
,
PaulGregory
)
»
[Tutorial] Pagination
Pages: [
1
]
2
Go Down
« Previous topic
Next topic »
Print
Author
Topic: [Tutorial] Pagination (Read 9174 times)
0 Members and 1 Guest are viewing this topic.
chrisandy
Full Member
Posts: 153
[Tutorial] Pagination
«
on:
Feb 20, 2007, 06:26 AM »
First of all many thanks to you guys for pointing me in the right direction time after time - my testing is going extremely well - I'm very optimistic and very impressed.
How can I paginate the results in Ditto so that only a certain number of results are returned per page and I can use the 'previous' and 'next' options?
Thanks again
«
Last Edit: Feb 26, 2007, 07:08 PM by Mark
»
Logged
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: Pagination
«
Reply #1 on:
Feb 20, 2007, 09:08 AM »
Assuming you are using Ditto 2:
&summarize = number of results per page
&paginate = 1
&paginateAlwaysShowLinks= 1
Then add this after the Ditto call:
Code:
<p>Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles | Page <strong>[+currentPage+]</strong> of <strong>[+totalPages+]</strong></p> <div id="ditto_pages"> [+previous+] [+pages+] [+next+] </div> </div>
And here is some example CSS to get you started:
Code:
.ditto_paging {
border-top: 1px solid #ccc;
padding: 10px;
font-size: 86%;
color: black;
}
#ditto_pages .ditto_currentpage {
border: 1px solid black;
padding: 1px 5px 2px;
margin-right: 1px;
background-color: #008CBA;
color: #fff;
}
#ditto_pages .ditto_off {
border: 1px solid #ccc;
padding: 1px 5px 2px;
margin-right: 1px;
color: #ccc;
}
#ditto_pages a, #ditto_pages a:link, #ditto_pages a:visited {
border: 1px solid #008CBA;
padding: 1px 5px 2px;
margin-right: 1px;
text-decoration: none !important;
color: black;
}
#ditto_pages a:hover {
background-color: #fff;
color: #000;
}
Updated: Added example CSS.
«
Last Edit: Mar 17, 2007, 03:57 PM by Mark
»
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
chrisandy
Full Member
Posts: 153
Re: Pagination
«
Reply #2 on:
Feb 20, 2007, 12:50 PM »
Thank you - worked a treat
Logged
yentsun
MODx Russia
Moderators
Posts: 514
Re: [Tutorial] Pagination
«
Reply #3 on:
Apr 14, 2007, 04:51 PM »
I'd like to know how to use pagination with multiple ditto calls on a page. And how the "id" parameter deals with [+pages+] placeholder.
In this call
Code:
[!Ditto? &id=`blog` &startID=`39,40,80` &tpl=`ditto_news` &sortBy=`createdon` &summarize=`7` &dateFormat=`%d.%m.%Y` &truncText=`далее...` &paginate=`1`!]
<div id="pagination"><span>Стр.:</span> [+pages+]</div>
no pages are displayed.
[Solved] When you set the "id" parameter, you should prefix the corresponding pagination placeholder with that id.
Example: [[Ditto? ... &id=`main` ...]]
[+main_pages+]
«
Last Edit: Apr 15, 2007, 02:50 AM by Mark
»
Logged
http://modx.ru
- российская поддержка MODx
http://modxnotes.blogspot.com/
- личный блог по MODx
SamZ
Sr. Member
Posts: 397
всегда ищу работу :-)
Re: [Tutorial] Pagination
«
Reply #4 on:
May 19, 2007, 12:47 PM »
Quote from: yentsun on Apr 14, 2007, 04:51 PM
I'd like to know how to use pagination with multiple ditto calls on a page. And how the "id" parameter deals with [+pages+] placeholder.
In this call
Code:
[!Ditto? &id=`blog` &startID=`39,40,80` &tpl=`ditto_news` &sortBy=`createdon` &summarize=`7` &dateFormat=`%d.%m.%Y` &truncText=`далее...` &paginate=`1`!]
<div id="pagination"><span>Стр.:</span> [+pages+]</div>
no pages are displayed.
[Solved] When you set the "id" parameter, you should prefix the corresponding pagination placeholder with that id.
Example: [[Ditto? ... &id=`main` ...]]
[+main_pages+]
I think that I have tha same problem
http://modxcms.com/forums/index.php/topic,14972.0.html
That should I do to use two ditto calls without problems?
Thanks I understood how to use it.
«
Last Edit: May 20, 2007, 02:30 PM by SamZ
»
Logged
[MODULE] CSV IMPORT :: модуль для добавления больших каталогов, из файлов с разделителями, с сохранением древовидной структуры.
russian
english
[FAQ] MODX 096
(основные проблемы и способы их решения)
SamZ
Sr. Member
Posts: 397
всегда ищу работу :-)
Re: [Tutorial] Pagination
«
Reply #5 on:
Jun 06, 2007, 11:54 PM »
Paginate does not with PHX.
I don't see pages.
Logged
[MODULE] CSV IMPORT :: модуль для добавления больших каталогов, из файлов с разделителями, с сохранением древовидной структуры.
russian
english
[FAQ] MODX 096
(основные проблемы и способы их решения)
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: [Tutorial] Pagination
«
Reply #6 on:
Jun 07, 2007, 01:05 AM »
There is a
known
workaround
for this.
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
SamZ
Sr. Member
Posts: 397
всегда ищу работу :-)
Re: [Tutorial] Pagination
«
Reply #7 on:
Jun 07, 2007, 12:37 PM »
Quote from: Mark on Jun 07, 2007, 01:05 AM
There is a
known
workaround
for this.
Thanks
Logged
[MODULE] CSV IMPORT :: модуль для добавления больших каталогов, из файлов с разделителями, с сохранением древовидной структуры.
russian
english
[FAQ] MODX 096
(основные проблемы и способы их решения)
holotrope
Jr. Member
Posts: 7
Re: [Tutorial] Pagination
«
Reply #8 on:
Jul 31, 2007, 05:31 PM »
Is there a way to use Ditto pagination on a site with Friendly URLs? I have been unable to get this to work so far.
Thanks in advance!
Tom
Logged
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: [Tutorial] Pagination
«
Reply #9 on:
Jul 31, 2007, 07:32 PM »
Ditto pagination should work fine with Friendly URLs out of the box. What sort of issue are you experiencing?
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
holotrope
Jr. Member
Posts: 7
Re: [Tutorial] Pagination
«
Reply #10 on:
Aug 01, 2007, 11:16 AM »
Here is my Ditto call:
[!Ditto? &depth=`1` &parents=`105,106,107` &summarize=`1` &paginate=`1` &tpl=`port_page` &paginateAlwaysShowLinks=`1` &display=`1` &sortDir=`ASC` &sortby=`menuindex`!]
The return I'm getting for [+next+] and [+previous+] are something like: thisurl.html?start=1, thisurl.html?start=2, etc.
Clicking on next and previous just refreshes the current page and moves the page key to next in order. The contents aren't changing though. It's still the same page. What am I missing?
Thanks!
Tom
Logged
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: [Tutorial] Pagination
«
Reply #11 on:
Aug 01, 2007, 06:59 PM »
What version of Ditto, MODx, and server software (Apache / IIS, MySQL, PHP, etc.) are you running?
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
holotrope
Jr. Member
Posts: 7
Re: [Tutorial] Pagination
«
Reply #12 on:
Aug 02, 2007, 09:46 AM »
Ditto 2.0.2
Modx 0.9.6
PHP 5.0.5
Linux server running Apache/1.3.37
Logged
SamZ
Sr. Member
Posts: 397
всегда ищу работу :-)
Re: [Tutorial] Pagination
«
Reply #13 on:
Aug 02, 2007, 01:44 PM »
Do you use PHX plagin?
Logged
[MODULE] CSV IMPORT :: модуль для добавления больших каталогов, из файлов с разделителями, с сохранением древовидной структуры.
russian
english
[FAQ] MODX 096
(основные проблемы и способы их решения)
moebius
Jr. Member
Posts: 21
Re: [Tutorial] Pagination
«
Reply #14 on:
Nov 27, 2007, 03:49 PM »
Hello,
I have ditto set up with pagination, and that works fine, except when there are no results I get "Page of" where my pagination links usually go. Is there any way I can get rid of these completely when I have no results?
Logged
Pages: [
1
]
2
Go Up
Print
« Previous topic
Next topic »
Jump to:
Please select a destination:
-----------------------------
Announcements
-----------------------------
=> Important News
=> Security Notices
-----------------------------
Commercial Support
-----------------------------
=> [CS] About Commercial Support
-----------------------------
Development & Coding
-----------------------------
=> Commercial Inquiries & Bounties
=> Core Code
===> MODx Next
===> xPDO
=> Module, Plugin & Snippet Creation and Modification
=> In Development
=> Templates
=> Internationalization
===> Bulgarian
===> Chinese
===> Czech
===> Dutch
===> French
===> German
===> Irish
===> Italian
===> Japanese
===> Polish
===> Portuguese
===> Russian
===> Slovak
===> Spanish
===> Swedish
===> Persian - فارسي
-----------------------------
Support
-----------------------------
=> Release Support
===> 0.9.6.1
===> 0.9.6
===> 0.9.5 and earlier
=> General Support
===> MODx 101
===> E-Commerce, E-Marketing, Analytics & SEO
===> Hosting Experiences
===> IIS / Windows Hosting Issues
=> Documentation, Tips & Tricks
===> Documentation Suggestions & Corrections
-----------------------------
Add-ons, Extensions & Elements
-----------------------------
=> Module, Plugin & Snippet Usage
=> General Repository Items Support
=> Navigation & Tagging/Taxonomy
===> Wayfinder (and DropMenu)
=> Creating & Repurposing Content
===> Ditto
===> Jot
===> QuickEdit
=> Users, Authentication & Personalization
===> WebloginPE
===> WebLogin, WebSignup and WebChangePwd
=> Rich Text Editors & File Browser
===> TinyMCE
===> FCKeditor
===> MCPuck File Browser
=> Forms, Form Processing & Anti-Spam
===> eForm
=> Search
===> AjaxSearch
=> E-business
=> Images, Videos & Podcasts
===> MaxiGallery
=> Manager, Parser & the Core
===> PHx
=> Templates
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Web Design and Development
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
Bulgarian Community
-----------------------------
=> Поддръжка
===> Често задавани въпроси
===> Инсталация
===> Модули, Плъгини, Снипети и код
===> Дизайн и Шаблони
=> Документация, Ръководства и Превод
===> Документация
===> Ръководства
===> Превод
=> Общество
===> Съобщения
===> Представете се
===> Представете сайта си
===> Дискусии извън MODx
-----------------------------
Dutch Community
-----------------------------
=> Ondersteuning
===> Veel gestelde vragen
===> Modules, Plugins, Snippets & Code
===> Design & Templates
=> Documentatie, Tutorials en Vertalingen
===> Documentatie
===> Tutorials
===> Vertalingen
=> Community
===> Aankondigingen
===> Stel jezelf voor
===> Site Showcase
===> De stamkroeg
-----------------------------
Finnish Community
-----------------------------
=> Tuki
===> UKK
===> Asennus
===> Moduulit, liitännäiset, koodinpätkät
===> Ulkoasu/Sivustopohjat
=> Dokumentaatio, oppaat ja käännökset
===> Dokumentaatio
===> Käännökset
===> Oppaat
=> Yhteisö
===> Tiedotteet
===> Esittele itsesi
===> MODx sivustosi
===> Kahvihuone
-----------------------------
Filipino Community
-----------------------------
=> Suporta
===> Kadalasang tanong
===> Instalasyon
===> Moduler, Maidadagdag, Karagdagang mga Code
===> Desenyo at Templates
=> Dokumentasyon, Mga Turo, Mga Salin
===> Dokumentasyon
===> Mga Turo
===> Mga Salin
=> Kumunidad
===> Anunsyo
===> Ipakilala ang sarili
===> Ang Galing ng pinoy
===> Tsismisan atbp
-----------------------------
French Community
-----------------------------
=> Support
===> FAQ
===> Installation
===> Module, plugin, snippets
===> Design/Templates
=> Documentation, Tutoriels et Traductions
===> Documentation
===> Traduction
===> Tutoriels
=> Communauté
===> Annonces
===> Présentez vous
===> Vos sites
===> Le Bistrot Français
-----------------------------
German Community
-----------------------------
=> Support (de)
===> FAQ (de)
===> Installation (de)
===> Module, Plugins, Snippets & Code (de)
===> Design & Templates (de)
=> Dokumentation, Tutorials und Übersetzung
===> Dokumentation
===> Tutorials (de)
===> Übersetzung
=> Community (de)
===> Ankündigungen
===> Stellt Euch vor
===> Beispielseiten
===> Off Topic / Verschiedenes
-----------------------------
Irish Community
-----------------------------
=> Tacaíocht
===> CC Ceisteanna Coitianta
===> Breiseáin (cláir bhreise), Snippets & Comhaid
===> Suiteáil
===> Dearadh & Teimpléid
=> Doiciméid, Teagascóireacht agus Aistriúchán
===> Doiciméadú
===> Teagascóireacht
===> Aistriúchán
=> Pobal
===> Fógraí
===> Cuir Tú Féin in Aithne
===> Gailearaí an Láithreáin
===> Caifé / An Tábhairne / Ábhar Cainte Eile / Ilghnéitheach
-----------------------------
Italian Community
-----------------------------
=> Supporto
===> FAQ
===> Installazione
===> Moduli, Plugin, Snippet e altro codice
===> Web Design e Template
=> Documentazione, Tutorial e Traduzione
===> Documentazione
===> Tutorial
===> Traduzione
=> Comunità
===> Annunci
===> Presentazioni
===> Siti in vetrina
===> Chiacchiere in libertà
-----------------------------
Japanese Community
-----------------------------
=> サポート
===> 良くある質問
===> インストール
===> モジュール・プラグイン・スニペット・本体
===> デザインやテンプレート
=> マニュアル・テュートリアル・翻訳
===> マニュアル
===> 事例集、テュートリアル
===> 日本語化
=> コミュニティ
===> お知らせ
===> MODxサイト展示場
===> 自己紹介
===> 雑談
===> 国産リソース
-----------------------------
Persian Community
-----------------------------
=> پشتيباني
===> راهنما
===> نصب
===> ماژول , پلاگین ها , کد ها و جزییات
===> طراحی و قالب ها
=> مستند سازی , آموزش ها و ترجمه ها
===> مستند سازی
===> آموزش ها
===> ترجمه ها
=> انجمن ها
===> اخبار
===> معرفی کردن خود
===> نمایش دادن سایت ها
===> بحث های عمومی و سایر موضوعات
-----------------------------
Polish Community
-----------------------------
=> Wsparcie
===> FAQ
===> Instalacja
===> Moduły, pluginy, snipety i kod
===> Wygląd i szablony
=> Dokumentacja, tutoriale i tłumaczenie
===> Dokumentacja
===> Tutoriale
===> Tłumaczenie
=> Społeczność
===> Ogłoszenia
===> Przedstaw się
===> Twój serwis WWW
===> Hyde Park
-----------------------------
Portuguese Community
-----------------------------
=> Suporte
===> FAQ - Dúvidas Frequentes
===> Instalação
===> Módulos, Plugins, Snippets e Código
===> Design e Templates
=> Documentação, Guias e Traduções
===> Documentação
===> Guias
===> Traduções
=> Comunidade
===> Anúncios
===> Apresente-se!
===> Bar da esquina (fora de tópico)
===> Portfólio de Sites
-----------------------------
Russian Community
-----------------------------
=> Поддержка
===> ЧАВО (FAQ)
===> Установка
===> Модули, плагины, сниппеты и код
===> Дизайны и шаблоны
=> Документация, Уроки, Перевод
===> Документация
===> Уроки
===> Перевод
=> Сообщество
===> Объявления
===> Представьтесь публике
===> Галерея сайтов
===> Диван
-----------------------------
Scandinavian Community
-----------------------------
=> Support
===> Frågor och svar
===> Installation
===> Moduler, plugins, snippets och kod
===> Design & sidmallar
=> Dokumentation, guider och översättningar
===> Dokumentation
===> Guider
===> Översättningar
=> Webbgemenskap
===> Meddelanden
===> Presentera dig själv
===> Visa upp dina webbsidor
===> Ordet fritt
-----------------------------
Spanish Community
-----------------------------
=> Soporte
===> FAQ
===> Instalación
===> Modulos, Plugins, Snippets & Código
===> Diseño y plantillas
=> Documentación, Tutoriales y Traducciones
===> Documentatción
===> Tutoriales
===> Traducciones
=> Comunidad
===> Anuncios
===> Presentaciones personales
===> Muestra de sitios
===> El Café
-----------------------------
TÜRKÇE (Turkish)
-----------------------------
=> Destek
===> SSS
===> Kurulum
===> Modüller, Pluginler, Snippetlar & Kodlar
===> Dizayn & Temalar
=> Belgeleme, Eğitmenler ve Çeviri
===> Belgeleme
===> Eğitmenler
===> Çeviri
=> Topluluk
===> Duyurular
===> Kendinizi Tanıtın
===> Site Vitrini
===> Konu Dışı