Dynamic Website Content
Posted: Mon Feb 27, 2006 6:26 am
I'm just about to start a new project.
I'm wondering how to design it as it will have dynamic content.
Usually I would just make a header and footer html file of the design and for each page make a new php page and include the header and footer and put the content in the middle.
This time I want every page to be manageable from the admin panel. It would be easy if the pages were just static information but I want some/all of the pages to contain functionality via PHP. Also, my design can have mutliple content boxes, so I'm also wondering how to manage that. I was thinking maybe I could structure the table like so: page_ID, page_name, page_content1, page_content2, page_content3 - but that would limit the amount of content boxes available to use to 3.
So I was thinking would it be a good idea to allow the administrator to use some sort of custom tag to start and finish content blocks? like
and then just structure the table like so: page_ID, page_name, page_content.
Or should I just set let the administrator use the html the same as in my design? like
I think the second option is the most practical, but I'm wondering how you guys would tackle this problem?
Also, how would I go about implementing the second option? Would I just have to use str_replace alot?
Thanks
I'm wondering how to design it as it will have dynamic content.
Usually I would just make a header and footer html file of the design and for each page make a new php page and include the header and footer and put the content in the middle.
This time I want every page to be manageable from the admin panel. It would be easy if the pages were just static information but I want some/all of the pages to contain functionality via PHP. Also, my design can have mutliple content boxes, so I'm also wondering how to manage that. I was thinking maybe I could structure the table like so: page_ID, page_name, page_content1, page_content2, page_content3 - but that would limit the amount of content boxes available to use to 3.
So I was thinking would it be a good idea to allow the administrator to use some sort of custom tag to start and finish content blocks? like
Code: Select all
<content>
<title>A title</title>
whatever
</content>
<content>
<title>A different title</title>
whatever else
</content>Or should I just set let the administrator use the html the same as in my design? like
Code: Select all
<div class="content">
<h3>:: Flanking Menus</h3>
<p>With the popularity of three column layouts, this layout is bound to be useful to many. You may have seen this technique used at <a href="http://www.wrongwaygoback.com/" title="wrongwaygoback">dynamic ribbon device</a>. In fact, this "flanking menus" technique was devised by BlueRobot for that site. Surprisingly, the technique has caused quite a bit of talk. The concept is simple: a content box with large margins is flanked by two additional (menu) boxes.</p>
<p>An important benefit of this technique is the order of elements in the HTML source. Here, the order is essentially content, menu one, menu two. For old browsers, text-only browsers, screen-readers, and many alternative devices, this means that the content is displayed before the menus. And, after all, most users visit a page for its content.</p>
</div>Also, how would I go about implementing the second option? Would I just have to use str_replace alot?
Thanks