Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

Sorting items in Template View
Last Post 06/21/2010 10:36 AM by Peter Donker. 9 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Laurence Neville
New Member
New Member
Posts:56


--
12/16/2008 10:30 PM

Is there a way to sort items by something other than Title when in Template View? I would like to be able to sort by Last Modifed or by a custom attribute, and either ascending or descending.

Another request/suggestion: when setting up a token to display a custom attribute in Template View, the attribute name property is case sensitive. If this was case insensitive it might save some confusion.

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
12/16/2008 10:44 PM
Hi Laurence,
Good points. Template view has its limitations and its strengths. I'm trying to keep a balance between power and speed. I'll see what I can do.
Peter
Laurence Neville
New Member
New Member
Posts:56


--
12/16/2008 11:18 PM
Thank you. Its the only thing I have found so far I can't control with Template View (which is a really fantastic feature!!!!).
moore creative
New Member
New Member
Posts:23


--
05/12/2009 5:44 PM
Peter

Any news on the ability to custom sort? What we'd like to do is have a new field (attribute) for each document that would be a "sort order" field where we could enter an integer that would be the default sort order. That way we could control the exact order of a list without having to do dumb things like putting numbers in the file name, etc. This is a fairly urgent requirement for us and we'd be willing to pay for such an upgrade.


 
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
05/14/2009 8:55 PM
It's not in DMX 5.1 so it is not going to be available in the next weeks. What you could do in the meantime is check out the Shortlist to see if it can solve the basic needs. The source code is available here as well, so you can craft it any way you like.

Peter
moore creative
New Member
New Member
Posts:23


--
07/08/2009 8:27 PM

This won't work in the template view, but we figured out that by adding a custom integer attribute field that we could modify the Order By string in the category list module settings to sort on that custom field and thus to create an ad hoc sorting mechanism.

We created a new custom field name "SortOrder" and for all documents we can number them accordingly such as 10, 20, 40, 30, etc. Then in the settings for the category module we add:

>> SortOrder, LastModified DESC, Title  (or use whatever other fields are desired for sorting)

This works well for us now. My only request for a future release would be the ability to add a "default" field for any custom attribute. For example, in this case I'd like to be able to set a default of "9999" so the default sort order would fall back to the LastModified date unless specific sort order values lower than that are entered. I could probably order by "SortOrder DESC" and enter my sort values from high to low which would let all those with null go the bottom of the sort, but that would not be as intuitive for our end users.

I thought I might be able to add a default for some specific column directly in the database somewhere but apparently it isn't that easy. If that IS possible, please let me know. Otherwise, consider it an enhancement suggestion.

 

Barend Emmerzaal
New Member
New Member
Posts:2


--
06/18/2010 9:42 AM

I know this is an old topic and maybe there is already a solution but I managed to let my users sort the tables by column. I have a customer who uses DMX Template Views very often and they needed some solution to let their users sort the tables (in Template View) based on the columns. So, I search for a script who can do this and found a Jquery solution here: http://tablesorter.com/docs/. After implementation my tables can be sorted by clicking on the columntitles. It works great for documenttitles, numbers and even document types (PDF, Word, Excel).

So Peter, maybe you can use this?

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
06/18/2010 11:18 AM
Hi Barend,

jQuery sounds like a great option. In a future revision of this I'll make adding this easier. For now you'll need to tweak to make sure the scripts are loaded and HTML is output correctly.

Peter
moore creative
New Member
New Member
Posts:23


--
06/18/2010 5:06 PM

 the benefits of tablesorter would be that it's jquery connected... i haven't seen it in a while, but wanted to also recommend TableCloth. It's another javascript table sorter which does styling, alternating row styles, sorting, rearranging column order, and best of all pagination of rows. Very smooth... you might want to look it up if you're not getting everything you want out of tablesorter.

Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
06/21/2010 10:36 AM
I can fully see that. I've seen some pretty cool jQuery table sorting techniques out there. The only downside is that it is no longer querystring driven. That means that you can't copy a url and send it to someone with the column sorting you chose.
You are not authorized to post a reply.