Created
April 29, 2012 16:07
-
-
Save mrconnerton/2551579 to your computer and use it in GitHub Desktop.
change site name and such based on path.
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 | |
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