Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-10-07 00:21:28

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

category weighting to allow sortby

I don’t know if this is sane! or trivial or a lotta work but…

is it possible for categories to get an additional field? something like “weight” – with the ability to sortby “weight” … ?

use case: setting up a large static site, that tries to follow the basic principles of clean mean txp … articles are assigned section, parent category and sub category, but are not shown individually, just as category lists…

I think I’ve got all the menus working sweetly, all dynamically generated, so adding content in new areas is a breeze (no navs in forms to hand-edit) – but of course all lists of categories are sorted alphabetically

not a showstopper as they would say but a little control over the order of display would be good

Offline

#2 2006-06-27 15:48:54

jamiew
Archived Plugin Author
From: NYC
Registered: 2005-01-08
Posts: 74
Website

Re: category weighting to allow sortby

I do this by using a custom field — then I just sortby=“Custom1” (or whatever field, I renamed mine to “sort_key”)

Edit: didn’t really read the question quite right — this only works for articles, obviously, and can get very tedious, but could be hacked to produce the desired effect

Last edited by jamiew (2006-06-27 15:49:56)

Offline

#3 2006-06-28 00:30:46

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: category weighting to allow sortby

it could work the way links work …

when adding a link, the field “Sort Value” is automatically populated with the title (thus allowing alphabetical sorting by default) … but you can go in and change that field

this’d be great with sections and categories – and I don’t think the devs are unaware of it, so no doubt it’ll come under consideration

Offline

Board footer

Powered by FluxBB