close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Need to reorder the side menu categories in PowerStore 4

Thread began 10/18/2010 11:20 pm by lejohnson01403530 | Last modified 7/18/2011 1:57 pm by biz295654 | 1260 views | 7 replies |

lejohnson01403530

Need to reorder the side menu categories in PowerStore 4

I need to show the categories in the main menu products drop down as well as the side menu categories in reverse alphabetical order. I found other articles that talk about reordering the categories, but I am not seeing the intermediate.php or main.dwt.php files in PowerStore 4. Has this changed in version 4?

Sign in to reply to this post

Jason ByrnesWebAssist

yes, it has changed in PS4.


the sidemneu is generated by the webassist/plugins/sidemenu/sidemenu.php page.




you can change the recordset code:

php:
$query_SubCategoryList = "SELECT * FROM ps4_categories WHERE CategoryParent = ".$StartWith . " ORDER BY CategoryName";



to order descending:

php:
$query_SubCategoryList = "SELECT * FROM ps4_categories WHERE CategoryParent = ".$StartWith . " ORDER BY CategoryName DESC";
Sign in to reply to this post

lejohnson01403530

Adding ORDER BY ... DESC works for the main menu products drop down, (main_menu/menu.php). However, I changed side_menu/sidemenu.php to:

$query_SubCategoryList = "SELECT * FROM ps4_categories WHERE CategoryParent = ".$StartWith . " ORDER BY CategoryName DESC";

and it has no affect on the order of the categories in the side menu. Any other ideas?

Sign in to reply to this post

Jason ByrnesWebAssist

sorry, the recordset to edit is in the side_menu/nested_accordion/sidemenu.php page:

php:
$query_SubCategoryList = "SELECT * FROM ps4_categories WHERE CategoryParent = ".$StartWith . " ORDER BY CategoryName DESC";
Sign in to reply to this post

lejohnson01403530

That did it. Thanks! I also found that if you remove the ORDER BY clause completely, it follows the order in the categories database. Good to know.

Sign in to reply to this post

Jason ByrnesWebAssist

OK, glad to hear it is working.

Sign in to reply to this post

biz295654

I need to not use alphabetical for category order. Is there a way to do that? Perhaps I can add another field to that table and sort numerically?

Or perhaps the category parent number would be the right path?

thanks

Sign in to reply to this post

biz295654

Figured out a work around. A space before the category name moves it up to the top. Two spaces moves it above the single space. Works perfectly fine for my needs. Thanks.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...