OK, I've looked at CMS's, I've thought hard about the best approach to permit/enable clients to alter their content etc..... and I'm stunned at the vast array of basically limitless powqer this app's permit.... yet none of them are simple enough or small enough to just dump and let an idiot use, nor are they capable of permitting the client to alter "their area" without flaming mine.... unless I build sites around a CMS system.... which for small business sites strikes me as daft....

SO

Does the idea of having a html/xtml page as a template, with a section that loadfs another page into sound a smart way to go? This seperates their content from the design etc... so they can't break the site or try creating new sections etc... merely alter existing content.

If this does seem sensible, how do i go about using PHP to set up an area on the web page that calls up a seperate page, (the former page is the tmeplate I make, the latter page is their content!).

Any suggestions?

Recommended Answers

All 8 Replies

There is more than one way to do this. Do you want to use an i-frame (probably not)? If not this is one way:

<html>
<head>
stuff..
</head>
<body>
template stuff...
<!--  time for user content -->
<?php
include_once('user_content.php');
?>
more template stuff...
</body>
</html>

As far as I know for this to work the template page has to have the extension .php

I've been thinking about this... and it is (should be) easily implemented... .yet the drawback is that the page's content becomes non-SEO....as they are created at the time.

What I need to do is find a way of parsing then making the changes permenant... till the next time!

This is so stupid! The only reason to do this is because we have a couple of clients that have no idea as to what they are wanting, and just want to sound big.... 14 static pages.... update once a month.... why the CMS!
Sheesh!

Which cms are you using? For my case, I use

$_SERVER

Well you could have the header and footer info in 2 files. Then when they update you could have a script read the header file into a string, then add the updated content to the string, then read the footer file into the string as well. Take the complete string and write it to a .html file.

Unfortunately there is no perfect solution.

The other option is to use mod_rewrite to make the search engine see the php page as static. Like Daniweb has done :)

why don't you just tell them to do add this to ever page

require "/home/domain/header1.php";

//there code goes here

require "/home/domain/header2.php";

Or, you could also so a server side include (SSI) this is an apache thing so that it will do it for you.

Or last but not least, you can modify htm and html files to load as php files using .htaccess AddType stuff but it will require the server to be restarted, or if u don't have permission to restart it waiting at least a day or two or however long until the server is restarted. once you have done this use the mod_rewrite feature to call your own scripts and make them all link your original php page

<html>
<head> stuff.. </head>
<body> 

template stuff... <!-- time for user content --> 
<?php include_once('user_content.php') ?> 
more template stuff... 
</body>
</html>

please not that while this third option may seem like the best (if you are not a server administrator), but please take note: this is generally a bad idea, as doing this will slow down the entire site! it the site isn't too big you might never notice it, but if it grows in size it might start to become a headache in which case you should look for dedicated hosting

OK.... erm.... der.... gee george.... wtf?

I have no idea... but thank ytou all for posting!
LOL

OK, I take it that is eseveral different methods to utilise php to call up the content, or to permit the client to allter the html, and call up the hdr/ftr etc.

I think I understand the application of ... mod_rewrite ... yet have no idea how to implement it.
(php is coming after css in the learning curve, which wobbles alot lately LOL!)

So, succinctly, it IS possible to have the code broken down so that I have a templated page, enable the page to load in a section via php, and convinve the server/search engines that it is a static page?

Is that correct? If so, then I think that will do... I'll just find a simple html/browser based txt esdito to let them connect and alter their part of things! easy!

Is that sarcasm?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.