-
☆ A M B ☆
- 476 Posts
Question: I’m trying to figure out what value I need for a parameter on Ditto to make documents list in Alphabetical order. For example, I’ve built a site that people are posting audio files on. They are entering the audio files in no particular order and unfortunately I can’t figure out how to list the documents being added to list by their name. For example, they are formating the document’s name by date:
- 07.2.21 Audio File Name
- 07.2.15 Audio File Name
- 06.3.24 Audio File Name
and so on...
I want the most recent date to be at the top and for the order to go down accordingly. Currently it is listing by when the documents were created. Here’s the page where I’m having a problem getting the documents to list correctly:
http://coastallifesd.com/our-messages.html
Here’s my Ditto call: [!Ditto? &startID=`40` &alwaysshow=`1` &sortDir=`ASC` &tpl=`Sermons` &tagData=`tvSermons` &summarize=`40`!]
I looked through the documentation and couldn’t not find the info I needed. Anyone know how to fix this?
Thanks!
Precision Web Development ... SmashStack.com
1. What version of Ditto are you using?
2. &alwaysshow=`1` and &tagData=`tvSermons` should not be in your call... AlwaysShow is for always showing pagination previous and next links and tagData is for use with tagging...
3. The easiest way to handle this would be to create a date TV and give it the unixtime widget. Then append &sortBy with it equal to the name of the tv you created (include the prefix tv if you are using a Ditto version before 2).
4. If you are familiar with PHP you can write a simple snippet to get the first x characters of the document title and then use the strtotime function to convert it to unixtime value which Ditto can sort by...
-
☆ A M B ☆
- 476 Posts
Thanks Mark for the insight...I’ll make the changes as you advised. I’m also using the latest version of Ditto 1.0.2
I really appreciate your taking the time to help with things like this. I’ll give it a try and reply with the response.
Precision Web Development ... SmashStack.com
-
☆ A M B ☆
- 476 Posts
Hello Mark,
I actually figured out a much easier way...here’s the new Ditto call:
[!Ditto? &startID=`40` &tpl=`Sermons` &sortBy=`pub_date` &sortDir=`DESC` &summarize=`40`!]
Under the "Page Settings" tab, click on "Publish Date" and specify when the document was published. In this case, I’ve got a church that is uploading sermons and I wanted them to be able to upload them in no particular order but yet set them in order.
Thanks for your willingness to answer my questions! I appreciate it!
Precision Web Development ... SmashStack.com
thanks that is great! works perfect, thanks so much for your help! brilliant!