Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP Templates

Status
Not open for further replies.

M2E

IS-IT--Management
Aug 1, 2005
28
GB
Hi there,

I have a website which I use templates for. I now want to add some PHP in the template, and have found that I can create a new template as main.dwt.php and this works fine.

However I can not update the current template like this, as it then dis-associates itself from the other files in the site.

Is there a way I can make my current template PHP compatible?

Thanks..

----Ment2Excel (M2E)----
--LEARN BY EXAMPLE--
 
you can put code inside the .dwt file just fine. Leave it with the .dwt extension.

It is when you create web pages using the template that you then use the .php extension

for example

you have your template main.dwt inside main.dwt you have your php code with appropriate code identifiers <?, <% (asp), etc.

save the file as a template - retaining the name main.dwt

you then create say an index page from the template main.dwt
include any changes you wish - then save the index page as index.php - any code that is in the main.dwt template (outside editable regions) will be automatically included in index.php.



good to go.

"Ever stop to think, and forget to start again?"

Stuart
A+, Net+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top