Jump to content


Photo

Make menu/page editing dynamic


  • Please log in to reply
3 replies to this topic

#1 blinton25

blinton25
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 14 August 2006 - 11:27 AM

Hello,

I have some php code (manage_page.php attached) which I use to edit content for web pages and store this content in the database. However when I need to add a new page it involves a manual process of creating a page (e.g. newpage.php attached), adding menu items, and adding the name of the page created to manage_page.php

1. Could you outline a way of making this more dynamic? I am thinking that I should be able to load a single page which would allow me to specify the page name, and which would then create the page, and update a table with the name of the page.

2. How do I make the menu (manage_page.php and newpage.php) dynamic so that the names for the menu options are automatically placed in the menus?

[attachment deleted by admin]

#2 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 14 August 2006 - 12:02 PM

You would most likely get more replys if you posted the actual code.

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#3 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 14 August 2006 - 12:12 PM

The sites I have developed recently have been 'single' page - that is you only see /index.php in the url followed by any parameters needed to grab content from a database etc etc.

To create a truely dynamic page as you suggest would require some templating system where you can dictate what elements are in the menu adn which data to grab from your db.

instead of creating a new php page each time have one that can display everything you need (having to produce a new php page each time is almost the same as hving to produce a new html page!!!!)
follow me on twitter @PHPsycho

#4 blinton25

blinton25
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 14 August 2006 - 01:02 PM

Hello,

The code is attached as newpage.zip.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users