saving time with templates

They have: 6 posts

Joined: Jun 2005

What's the best way to get a site saving time down the road?

I'd like to have a template so if i ever change something (advertising for example) I can just change the one page and it will update all 3000.

I know it can be done with php and dreamweaver has templates.

What would you say is the best way to do it.

demonhale's picture

He has: 3,278 posts

Joined: May 2005

either use some CMS or code your own php pages... proper css tagging also helps a lot, since changing just the css will change the whole look of the site... In my opinion, make the site either in ASP or PHP...

They have: 6 posts

Joined: Jun 2005

the only problem with .asp is that i'm running on a linux server.

I know it could be easy with javascript but the problem would be putting adsense inside javascript (which isn't possible.)

I also know some php but the problem i come to there is that i wouldn't want all my pages to be php.

I've seen it's possible to put php inside html but i haven't got that working yet. could be my webhost or my .htaccess file maybe?

anyways. I know there are more ways so keep em coming!

P.s. i'm not the domainking. I'm the domainrookie. I don't even recall picking this stupid name. If you are out there admin! Change it if possible. I sent you a message.

Your's truly
domainrookie:rolleyes:

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

domainking;209477 wrote: I know it could be easy with javascript but the problem would be putting adsense inside javascript (which isn't possible.)

Actually, it wouldn't be smart to do this with Javascript, for a variety of reasons. It will affect accessibility where Javascript is disabled or not supported, and partial content will be hard to read, etc etc. Smiling

domainking;209477 wrote: I also know some php but the problem i come to there is that i wouldn't want all my pages to be php.

Why not? It will save you time down the road.

domainking;209477 wrote: I've seen it's possible to put php inside html but i haven't got that working yet. could be my webhost or my .htaccess file maybe?

You can embed PHP in any file by using

<?php
</strong>  ... <strong>
?>
tags. Apache will parse that as PHP code if it's in a file with a known extension (like .php).

With mod_php, you can add in .htaccess other extensions, say .html, with AddType application/x-httpd-php .html'

[If MultiViews is enabled in Apache, it's a little more complicated.]

However, if you have 3000 or so files, you probably ought not embed PHP in every one of them, as it will still be hard to maintain. A better way would be to dynamically generate the HTML output via a script, like a CMS, as demonhale suggested. Smiling

They have: 6 posts

Joined: Jun 2005

thanks for the help.

I was having .htaccess problems as you suggested. Well i guess I mentioned something about that too.

Anyways.

thanks for the help.

Stinky (formerly known as the domainking) Confused

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.