Jump to content

CMS adding pages with links


bullbreed

Recommended Posts

Hi. I'm looking for a little direction in creating my CMS project.

I'm trying to create a dynamically driven navigation where the admin can add and remove pages.

I have a form that ask for the following information

 

Page Name - This is the text that is shown for the link

Page Parent - For parent and child hierarchy

Meta Title

Meta Description

Meta Keywords

Page Content

 

How do I create the links for the pages? I don't want the admin to have to type "about-us.php"

I would like it so when the user adds (About Us) as a page name that the url says pid=2 or something like that.

 

Any push in the right direction would be great.

 

Link to comment
https://forums.phpfreaks.com/topic/193277-cms-adding-pages-with-links/
Share on other sites

create a database

like this

pid, directory

 

select * from pages where pid=$pid

//your own code to do the mysql_query

$rc=mysql_fetch_array($q)

if(file_exists($rc['directory']))

include $rc['directory']

 

 

 

 

 

//to store stuff

file_put_content($_POST['page_content'], $directory);

 

 

NOTE: my directory means folder/filename.extension

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.