WebsiteBaker Community Forum

General Community => Global WebsiteBaker 2.8.x discussion => Topic started by: noname8 on November 16, 2010, 03:19:42 PM

Title: Small mod for adding sub pages
Post by: noname8 on November 16, 2010, 03:19:42 PM
So If you have wb 2.8 and huge site it's pain for adding 20 psc of sub pages under same page.


To make it easier I've added small link + session variable. Of course there is the green + sign on the right but this saves time even more.

admin/pages/add.php
Code: [Select]
//line 43
$_SESSION['lastaddparentpage']=$parent;

admin/pages/index.php

Code: [Select]
//line 570
$latestaddhacktxt='';
if($_SESSION['lastaddparentpage'] >1) $latestaddhacktxt='(Same)';
// Insert language text and messages
//...
//...
//...
//line 589 add 1 more line:
'INTRO_LINK' => $MESSAGE['PAGES']['INTRO_LINK'],
'LATESTADDHACK' => '<a href="#" onclick="add_child_page('.$_SESSION[lastaddparentpage].');return false;" title="Click to set to latest">'.$latestaddhacktxt.'</a>'

and templates\wb_theme\templates\pages.htt:

Code: [Select]
// find {TEXT_PARENT}: and convert the line to
  <td width="70">{TEXT_PARENT}: {LATESTADDHACK}</td>



Any suggestions are welcome