Issue:Using custom ordermethod

From FollowTheScore
Jump to: navigation, search
Description: I would love DPL to be able to sort his results based on variable template content.
Extension / Version: DPL   /   Current
Type / Status: Change Request   /   open

Problem

Hey Gero sorry for not improving the Cache API lately, I've been so busy with my projects it's incredible. I still want to do it but I can't right now. Here's a change that I would really love to see. I'm using DPL basically as the front-end of a database system implemented inside MediaWiki with semantic forms, etc... We're into history, date, collection of documents, etc... Dates are thus really important. But not the date the article was written or the date it was last modified. The |Day=17 |Month=02 |Year=2002 variables that are included in the templates. For example see here. But i'd like to display those results how the user wants it. Sometimes it's in alphabetical order of the title, which is great. But sometimes it's by date. Would it be possible to add a ordermethod option that would list the pages in the order specified by the alphabetical order of a template value, or multiple template values ? For example, I could say classify by : [Document]:Year, then by [Document]:Month, then by [Document]:Day. So we would end up with a dynamic list of time-classified events (a timeline). That would save my life! EmuWikiAdmin- 00:27, 22 August 2009 (UTC)


Reply

Have you seen DPL Example 023?

Do you want table output or do you just want to list the page names?

Did you try tablesortcol?

Is the problem that you need several template variables for sorting and not just one?

Using interactive sorting together with a javascript snippet which triggers the sort before the initial display you should be able to create a column which contains the combined values of your template variables and use that column for sorting...

Gero 11:57, 22 August 2009 (UTC)

Oh great I hadn't seen this example. I'll give it a try.