Created
April 12, 2014 16:25
-
-
Save shannah/10544261 to your computer and use it in GitHub Desktop.
Adding custom CSS classes to <body> tag
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
<?php | |
class conf_ApplicationDelegate { | |
function beforeHandleRequest(){ | |
$app = Dataface_Application::getInstance(); | |
$query = $app->getQuery(); | |
$app->addHeadContent('<link rel="stylesheet" type="text/css" href="style.css"/>'); | |
} | |
function block__body_atts(){ | |
$css_classes = array(); | |
$app = Dataface_Application::getInstance(); | |
$query = $app->getQuery(); | |
$css_classes[] = 'table-'.$query['-table']; | |
echo 'class="'.htmlspecialchars(implode(' ', $css_classes)).'"'; | |
} | |
} |
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.table-dashboard div#top-search-form { display:none;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment