MODx Community Forums
The MODx Blog
Donations
Feedburner Feeds
Documentation
Bugs & Requests
The Wiki
download MODx
plugins, modules, snippets
online demo
Dec 04, 2008, 03:53 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
Search via SMF
or Google:
modx forums
all of modxcms.com
web
MODxCMS.com
Forums
Help
Login
Register
News
:Read
Frequently Asked Questions (FAQ)
MODx Community Forums
»
Add-ons, Extensions & Elements
»
Creating & Repurposing Content
»
Ditto
(Moderators:
Mark
,
PaulGregory
)
»
Sort by a date TV
Pages: [
1
]
2
Go Down
« Previous topic
Next topic »
Print
Author
Topic: Sort by a date TV (Read 3349 times)
0 Members and 1 Guest are viewing this topic.
bigSlim
Jr. Member
Posts: 32
Sort by a date TV
«
on:
Aug 08, 2007, 03:50 AM »
Hi
I am currently using the listIndexer snippet to display a list of Events. Currently they are being ordered by creation date. I know I can change this ''createdon' date order to 'editedon' date
OR
change the order to 'alpha' or 'menuindex'
BUT
What I'd like to order it by is the event start date. I have created a TV called EventStartDate for each Event.
Can someone tell me how I can order my Events by this TV please?
Thanks in advance
bS
Logged
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: ListIndexer Order
«
Reply #1 on:
Aug 08, 2007, 10:46 AM »
You can do this with Ditto. There is a tutorial available here:
http://ditto.modxcms.com/tutorials/sort-by-a-date-tv.html
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
bigSlim
Jr. Member
Posts: 32
Re: ListIndexer Order
«
Reply #2 on:
Aug 08, 2007, 02:54 PM »
Hi
Thanks for the reply but im still not sure how to execute this? Do i no longer need to use ListIndexer?
If so, how do I then use Ditto to call all sub documents from the parent document? And then what do I do to order by mt date TV?
Sorry for my lack of knowledge
Regards
bS
Logged
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: ListIndexer Order
«
Reply #3 on:
Aug 08, 2007, 03:49 PM »
You would use Ditto to execute this. To get all sub documents (assuming you have at least Ditto 2.0.2) just append &depth=`0`. As for the date sorting, follow the tutorial in my previous post.
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
bigSlim
Jr. Member
Posts: 32
Re: Sort by a date TV
«
Reply #4 on:
Aug 09, 2007, 03:05 AM »
I still can't seem to get this working. If I can explain my situation:
I have a document (id=54) executing a Ditto call [[Ditto? &parent=`71` &depth=`0` $display=`5` &sortBy=`EventStartDate` &dateSource=`EventStartDate`]]
I have a container (id=71) containing 5 documents (events)
All Im getting is list of 5 documents but not ones specific to that parent id?
Can you help me further please
Thanks
bS
Logged
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: Sort by a date TV
«
Reply #5 on:
Aug 09, 2007, 03:18 AM »
&parents (note the s)
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
bigSlim
Jr. Member
Posts: 32
Re: Sort by a date TV
«
Reply #6 on:
Aug 09, 2007, 07:41 AM »
Oh dear! Thanks...
So how do I format the unixtime field when not using the ditto snippet? (Since I had to change the TV to UNIXTIME instead of the original Date Formatter)
Its fine when in the events list page as I can format with the ditto snippet but when in the actual event page, since im calling is [*EventStartDate*] im getting it as a unixtime format??
how can this be formatted?
Thanks again
bS
Logged
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: Sort by a date TV
«
Reply #7 on:
Aug 09, 2007, 10:12 PM »
You can either use the DateFormat snippet or PHx.
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
bigSlim
Jr. Member
Posts: 32
Re: Sort by a date TV
«
Reply #8 on:
Aug 10, 2007, 11:50 AM »
Hmmm? Came across another issue....
When I used the ListIndexer snippet, I could modify the following code and insert a TV value EventType and call it
----------------
$EventTypeClass=$tvEventType['EventType'];
// Link to page
$output .= '<td class="'.$EventTypeClass.'">'.$EventTypeClass.'<br /><a href="[~'.$recentRecord['id'].'~]" title="'.strip_tags($recentRecord['pagetitle']).'">'.$recentRecord['pagetitle'].'</a></td>';
-----------------
How can I add this into the english.inc.php file? (Im presuming this is where you can change the outputted code)
Currently I have:
----------------
<tr><td class="eventdate">[+date+]</td><td><a href="[~[+id+]~]">[+pagetitle+]</a></td></tr>
----------------
I've tried adding in code as in the 1st example but it doesn't like it....
Thanks again
bS
Logged
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: Sort by a date TV
«
Reply #9 on:
Aug 10, 2007, 06:27 PM »
Follow this tutorial for custom templating:
http://ditto.modxcms.com/tutorials/creating-a-custom-template.html
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
fruitwerks
Sr. Member
Posts: 333
I have 70 birds, I deal with enough sh.. :)
Re: Sort by a date TV
«
Reply #10 on:
Feb 28, 2008, 11:27 AM »
... I am trying to use the link mentioned earlier to show a human readable date, but all I get is the unix date... Did I miss something?
Thanks
Logged
Mark
Moderator
Posts: 3,247
Ditto Developer
Re: Sort by a date TV
«
Reply #11 on:
Feb 28, 2008, 09:34 PM »
Can you provide the debug output of your call?
Logged
Documentation
TRAC (Bugtracker)
Forum
How to get help
User Wiki
Credits
SVN Server
Ditto HQ
Stable Download
Development Download
fruitwerks
Sr. Member
Posts: 333
I have 70 birds, I deal with enough sh.. :)
Re: Sort by a date TV
«
Reply #12 on:
Feb 28, 2008, 10:32 PM »
debug enabled...
http://sweetskies.fruitwerks.us/non_menu_items/nestbox_news.php
I think I tried this before, but I added separate month day and year tv's
Logged
tkfm
Committed to MODx
Posts: 624
Re: Sort by a date TV
«
Reply #13 on:
Feb 28, 2008, 11:13 PM »
I think you should use [+date+] instead of [+nbn_date+] in your Ditto
template chunk.
Code:
<hr/>
<h3>[+title+]</h3>
<p>[+introtext+]</p>
<p>[+date+]</p>
Logged
fruitwerks
Sr. Member
Posts: 333
I have 70 birds, I deal with enough sh.. :)
Re: Sort by a date TV
«
Reply #14 on:
Feb 28, 2008, 11:15 PM »
I was thinking that as well, but it renders a blank page..
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.2
===> 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 & 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
=> Polls, Calendars, Address Book and Community
=> Third-party integrations
=> Images, Videos & Podcasts
===> MaxiGallery
=> Manager, Parser & the Core
===> Backup & Versioning
===> Doc Finder
===> ManagerManager
===> PHx
=> Templates
-----------------------------
General Discussions
-----------------------------
=> General MODx Discussions
=> Web Design and Development
=> Wishlist
=> You and Your Sites
=> modxcms.com Discussions and Suggestions
=> Off-topic
-----------------------------
Czech Community
-----------------------------
=> Oznámení
===> Důležitá oznámení/novinky
===> Bezpečnost
=> Podpora
===> FAQ (často kladené otázky)
===> Instalace
===> Moduly, pluginy, "snippets & code" (šablony zdrojových kódů)
===> Design & Šablony
=> Dokumentace, tutoriály (návody) a překlady
===> Dokumentace
===> Tutoriály (návody)
===> Překlady (lokalizace)
=> Komunita
===> Oznámení
===> Představte se, prosím
===> Ukázky práce
===> Různé aneb cokoli co se jinam nehodí
-----------------------------
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ışı