Forum Moderators: coopster

Message Too Old, No Replies

customising landing pages using php

         

ssling

9:53 am on Nov 13, 2006 (gmt 0)

10+ Year Member



i am using some extrememly simple php code to include pieces of code that don't change very often, as follows:

<?php
include ("sample.html");
?>

now i would like to include code that will change everytime a page is requested. to be clear, i am trying to customize landing pages which are tied to specific keywords in a pay-per-click ad campaign.

basically, i would like to do two things:
a) change the page title, text within <h1> tags and other elements within the html code of the landing page, based on the requested url.
b) include different external files in the page based on the requested url.

is this possible with php? is this already discussed in a previous thread?

thanks!

dreamcatcher

10:37 am on Nov 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi ssling,

Sounds like what you are looking for is a templating engine. Try one of the following:

Smarty
[smarty.php.net...]

Savant2
[phpsavant.com...]

dc

ssling

4:48 pm on Nov 13, 2006 (gmt 0)

10+ Year Member



hi dreamcatcher... thanks very much for the links. that looks pretty much like what i'm trying to do, i guess.

time to roll up those sleaves!

dreamcatcher

6:14 pm on Nov 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Good luck. Once you get the hang of how they work, they are fairly easy to understand. Me personally, I prefer Savant2, but its each to his own. There are numerous other ones out there too.

dc