CMS Questions - Just Brainstorming.
Pretty soon, I'm going to need a CMS (Content Management System) for a client and since it's the first one I'll ever be making, I want to clear some things up.
My plan is to use an XML document, as the following:
Code:
<about1>
About content here, paragraph 1...
</about1>
<about 2>
About content here, paragraph 2...
</about2>
<services1>
Services content here, p1...
</services1>
<services2>
Services, p2
</services2>
Except I plan on doing this with several other 'pages', content, links, etc.
Then, for the CMS, using explode:
PHP Code:
if(file_exists('content.xml')){
$edit = @include('content.xml');
$about = explode('<about2>',$edit);
$about1 = $about[0]; // About, Paragraph 1
$about = explode('<services1>',$about[1]);
$about2 = $about[0]; // About, Paragraph 2
$services = explode('<services2>',$about[1]);
$services1 = $services[0]; // Services, Paragraph 1
$services2 = $services[1]; // Services, Paragraph 2
// And on...
$about1 = explode('About',$about1);
$about1 = explode('</about1>',$about1[1]);
$about1 = $about1[0]; // About, Paragraph 1
// And on...
echo '<textarea>'.$about1.'</textarea>';
}
I left a lot out of the code, but I have you the general idea of what I want to do. Is there some easier way to do this? Then, I'm wondering how I would actually replace the information once the client submits their changes?