Created
January 25, 2017 11:02
-
-
Save martsie/c9884ffbcdbebdfb5d47091e531d2b49 to your computer and use it in GitHub Desktop.
An example of a consistent Drupal 7 page title update command
This file contains hidden or 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 | |
// Change the page title. | |
$site_title = variable_get('site_name'); | |
$page_title = t('My Great Page'); | |
$ajax_commands[] = ajax_command_invoke(NULL, 'changePageTitle', array($page_title . ' - ' . $site_title)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment