Category Order question

Phoca Gallery - image gallery extension
tamerax
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Aug 2008, 03:23

Category Order question

Post by tamerax »

Hi there

I'm sure this is really easy question but i couldn't find any info on it.

How do i setup the category list view to show the latest categories on top rather than the bottom in a one column view?

thanks! i LOVE this component!!
User avatar
Phryll
Phoca Member
Phoca Member
Posts: 15
Joined: 06 Aug 2008, 10:30
Contact:

Re: Category Order question

Post by Phryll »

It's always displaying as the first of the top because when you create a categorie it's normally identified as
id: 1

so it's the first category ehich is shown in your Gallery
i hope this helps you , otehrwise you can set the id's manually
Joomla Admin Control Panel --> Components --> PhocaGallery --> Categories --> (set id's)

Cheers Philipp
tamerax
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Aug 2008, 03:23

Re: Category Order question

Post by tamerax »

is there a way to possible change the PHP code on one of the pages to display them in descendening order instead of ascending?
like...change ASC to DESC somewhere?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category Order question

Post by Jan »

You can change the SQL query in models, see e.g.:

components\com_phocagallery\models\category.php

Jan
If you find Phoca extensions useful, please support the project
tamerax
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Aug 2008, 03:23

Re: Category Order question

Post by tamerax »

I changed this line in catagory.php

$this->setState('filter_order_dir', JRequest::getCmd('filter_order_Dir', 'ASC));

but nothing changed.
Did i miss something?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category Order question

Post by Jan »

Hi, I didn't try it, so I cannot say, but you should change the sql query in model (selecting the categories)

components/com_phocagallery/models/categories.php (I hope it is right, I am not on my PC, so I cannot check it )


Jan
If you find Phoca extensions useful, please support the project
tamerax
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 13 Aug 2008, 03:23

Re: Category Order question

Post by tamerax »

i decided just to change the order manually like previously suggested :P i was wasting too much time trying to get the sql to change.

thanks anyways. still love the component!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Category Order question

Post by Jan »

ok
If you find Phoca extensions useful, please support the project
Post Reply