Created
June 13, 2012 03:40
-
-
Save danielwrobert/2921698 to your computer and use it in GitHub Desktop.
A simple way to add a body class dynamically by removing the .php extension and echoing the name of the file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body class="<?=basename($_SERVER['PHP_SELF'],'.php')?>"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment