Ordering in categories

6 posts by 3 authors in: Forums > CMS Builder
Last Post: November 18, 2008   (RSS)

Re: [andycal] Ordering in categories

By Dave - October 16, 2008

Hi andycal,

What is the sorting set to for that section? (Under Admin > Section Editors)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Ordering in categories

By andycal - October 16, 2008

Ahh! That'll be it! It wasn't set. Now set it to : "globalOrder, siblingOrder" and it seems to be working fine.

Re: [Dave] Ordering in categories

Hello, i think i have a similar problem, but impossible to solve it.
I have lets say article. I create a "Section editor" for my article.
Each article are define with "category" (a list of choice), title, and content.
In order to display in a page only article of a specific category i do this :

'tableName' => 'article',
'orderBy' => 'category',
'where' => 'category="Sports"',

It works fine, but i want the page to list articles of "Sports" respecting the DragOrder in my admin.
So i try to do in Admin > Section Editors > Article >sorting this:
dragSortOrder DESC, category.
It doesn't work

I really need a page only with Sports Article (it works) but listed in the same order than in my admin .
Please help

Re: [willbegood] Ordering in categories

i found the solution i think :

I simply modify on top of the page

'tableName' => 'article',
'orderBy' => 'category',
'where' => 'category="Sports"',

TO

'tableName' => 'article',
'orderBy' => 'category, dragSortOrder DESC',
'where' => 'category="Sports"',

It seems to work

Re: [willbegood] Ordering in categories

By Dave - November 18, 2008

willbegood,

Glad you got it working! That looks just fine. If you know you'll always be showing only one category type you don't even need to sort by category first since they will all be sorted the same, but that will work just fine the way it is.
Dave Edis - Senior Developer
interactivetools.com