Hi,
I am going over the basic template system tutorial: http://betterphp.co.uk/playlist.html?pi ... 1A4FB3EE40 and I have a question here.
How can I add page titles? In the current version, all page titles are "Better PHP: Template System". But in a real site, it should be like "Home - Better PHP: Template System", "News - Better PHP: Template System", etc. different for each page.
Maybe Jacek could add a short video to the series about that.
PHP Tutorial: Basic Template System
Re: PHP Tutorial: Basic Template System
You could base the page title on the page...
Making it properly dynamic would be quite a major edit
<title><?php echo ucwords(str_replace('_', ' ', $_GET['page'])); ?></title>is something I have used before.
Making it properly dynamic would be quite a major edit
Re: PHP Tutorial: Basic Template System
Good idea, thanks a lot. This will be enough for me at the moment.jacek wrote:You could base the page title on the page...
<title><?php echo ucwords(str_replace('_', ' ', $_GET['page'])); ?></title>is something I have used before.
Making it properly dynamic would be quite a major edit