WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • Suggestion - Show primary module in pages list
  • Print
Pages: [1]   Go Down

Author Topic: Suggestion - Show primary module in pages list  (Read 4930 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 »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • Suggestion - Show primary module in pages list
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2