PDA

View Full Version : breaking Templates to use php


soundchaseruk
11-21-2009, 04:00 PM
A company who do the optimisation for our comapny site say I should break my templated site and to use php. I have learnt the code after making a menu.php and in the code I have tried to remove the DOC stuff but I am not sure how to break the pages away from the templates.

Do I make the menu.php then delete the templates dwt and make the pages again by NEW PAGE BLANK and then just insert the php include coding for the menu.php and then the main content to every page ?

What I have done to date by creating menu.php and index.php (or should that be saved as html ?) and when displayed in the browser the spry navigation graphics do not display. Is the is common or am i missing the menu bar spry assets ?

So a few questions here that I need help with.

1. How do I make new pages from the templated ones and how do I save them (+++.php or html ?)

2 Can I delete my two templates ?

3. When viewing the site without templates using php can I expect to get the same display as it will be when fully uploaded ?

If you want to see the current coding the sourse can be seen on
www.crmanagement.co.uk (http://www.crmanagement.co.uk)

Thanks for any help.

DWcourse
11-21-2009, 11:24 PM
You can use Dreamweaver's menu: Modify>Templates>Detach from Template command.

To use php on your pages, you'll need to change the extension from html to php or set up your server to handle .html pages as php. If you do that make sure you do a 301 redirect from the old pages to the new ones.

PHP is a nice way to build sites but it really doesn't have anything to do with optimizing the pages. IT can make it easier to edit section of your page (such as the menu). Did the company optimizing your site give you any reason for the change?

gentleone
11-22-2009, 12:27 AM
A company who do the optimisation for our comapny site say I should break my templated site and to use php.

I'm not a SEO-guru, but using PHP instead of HTML for SEO reasons doesn't make sense at all.

Corrosive
11-22-2009, 08:28 AM
I'm not a SEO-guru, but using PHP instead of HTML for SEO reasons doesn't make sense at all.

No, agreed. By the time the php has been parsed and the page is open then it is rendered as HTML anyway. Can't see the benefits other than speedy updates. Oh well.