Skip to content

Instantly share code, notes, and snippets.

@mrconnerton
Created April 29, 2012 16:07
Show Gist options
  • Save mrconnerton/2551579 to your computer and use it in GitHub Desktop.
Save mrconnerton/2551579 to your computer and use it in GitHub Desktop.
change site name and such based on path.
<?php
function mymodule_init(){
global $conf;
if(drupal_is_front_page()){
$conf['site_name'] = "WELCOME TO THE FREAKING HOMEPAGE!";
// $conf['other_vars'] = "to change";
} else {
switch($_GET['q']){
case 'node/12345':
$conf['site_name'] = "this node is awesome!";
break;
case 'some/view/path':
// yep
break;
}
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment