Not sure if it will work but can't you use $_SERVER['REQUEST_URI']; which should return everything after index, so if in the url you have www.site.com it will have a value of / or if the url is www.site.com/news/ it would return /news/ etc. then do something like this,,,
I want to say Chris made a screencast which showcased this but I can't remember. Your code somewhat works but if I have a subdomain the title displays:
Is there possibly a way to create page titles and body ID's dynamically as I create links in the navigation?
example:
As I create:
or
As I create:
Any ideas?
then do something like this,,,
I can't see why it wouldn't work but i havn't tested it and it's probably not the best way to go about it....
John Doe | /
Another question is how to get the title to be capitalized?
Title
Thanks @chrisbull for getting me started
<body id="<?= basename($_SERVER['PHP_SELF'], ".php")?>">to make the filename the body id.