- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘Back End’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
I am currently making my own little web app and I am using PHP’s include function to add a header.php file to all my pages (basically like WordPress). Now my only problem is how do I give different page titles to each page. What is the easiest and most efficient way to do this?
Thanks!
Well that depends on how you are making your pages? Are you using PHP or just a standard HTML file that includes the header at the top of each page.
Will the address be something like website.com/?page=1 or website.com/about.php
You can use the following:
Index.php
header.php
Robskiwarrior: Both the header file and all the standard page files are .php. The url would end with about.php.
eXo: Your method is good :)
Robskiwarrior, if you have any other methods that I could try, I would love to see!
eXo’s method is the easiest and fastest that I know of for the type of pages you have. Now if you had a page that rendered differently depending on certain circumstances and wanted to reflect those in the title, I would do almost the same thing except maybe grabbing another variable to add to the title.