jonw118 Posted February 18, 2010 Share Posted February 18, 2010 I have program that pulls in a lot of different modules and centralizes them to one menu. One of the modules lists all the individual CMS pages. I need these pages to display by the "priority" column. Unfortunately I've tried alot of different things to sort the CMS module pages by priority, but to no success. I hope I am providing all that is needed from the code here - and if anyone could lend any advise as to where I add the ORDER BY priority ASC I'd appreciate. From the index page, here is the code that loads the modules... this is where I've been trying to dissect where modules join and how to create a sort order for bullet point CMS pages: <?php foreach($sorted_modules as $module_name=>$seq) { if(count($menus[$module_name])==0 ) continue;?> <tr valign=top align=left> <td width=139 class="TextObject" style='padding-left:10px'> <?php if(strlen($menu_text[$module_name])>0) {?> <p><b><span style="font-family: Arial, Helvetica, Geneva, Sans-serif; font-size: 11pt;"> <?php echo ucwords($menu_text[$module_name]);?>- </span></b></p> <?php } foreach($menus[$module_name] as $name=>$action) echo "<li><span style='font-family: Arial,Helvetica,Geneva,Sans-serif; font-size: 10pt; color: rgb(39,90,121);'><a href='index.php?module=$module_name&action=$action'/>$name</a></span></li>";?> </td> </tr> <?php }?> Thanks - hope this makes sense what I'm trying to do! Quote Link to comment Share on other sites More sharing options...
kickstart Posted February 18, 2010 Share Posted February 18, 2010 Hi If the list of modules is coming from a database then sort them within the SQL (and at least post the SQL so we can see it). If it is built up in another way then this is a PHP issue and you probably need to use one of the various php sort functions. All the best Keith Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.