Suggestion - Show primary module in pages list

PurpleEdge

#1
I would like to see the primary module used for a page in the admin/pages/index.php file.

I've modified the sql statement as follows to get the primary module...


// Get page list from database
//   $sql = 'SELECT * FROM `'.TABLE_PREFIX.'pages` WHERE `parent` = '.$parent; // GWB
   $sql = 'SELECT pages.*, sections.module FROM `'.TABLE_PREFIX.'pages` INNER JOIN `'.TABLE_PREFIX.'sections` ON (pages.page_id = sections.page_id) WHERE `parent` = '.$parent;


...assuming the page_id = section_id for the primary module of a page?

I updated the join to match on page_id - and that gives the interesting effect of showing all the sections for a page - I don't know whether that is good or bad  :?

It is then easy enough to modify the table to display the module.

See attached image.

[gelöscht durch Administrator]