Author Topic: Suggestion - Show primary module in pages list  (Read 1633 times)

Offline PurpleEdge

  • Posts: 231
  • Gender: Male
    • the northern beaches
Suggestion - Show primary module in pages list
« on: May 18, 2010, 09:05:11 AM »
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...

Code: [Select]
// 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]
« Last Edit: May 18, 2010, 09:46:26 AM by PurpleEdge »

 

postern-length