Skip to content

Instantly share code, notes, and snippets.

@craigtaub
Created November 12, 2013 16:21
Show Gist options
  • Save craigtaub/7433750 to your computer and use it in GitHub Desktop.
Save craigtaub/7433750 to your computer and use it in GitHub Desktop.
pageTitle($page, $formStatus) {
$Localiser = new BBC_View_Helper_Localise();
switch ($formStatus) {
case 'subscribe_request_success': // Subscribe Request Success page
$pageTitle = $Localiser->localise('newsletter_'.$page.'_subscribe_request_success_title');
break;
case 'subscribe_request_failure': // Subscribe Request Failure page
$pageTitle = $Localiser->localise('newsletter_'.$page.'_subscribe_request_failure_title');
break;
case 'subscribe_success': // Subscribe Success page
$pageTitle = $Localiser->localise('newsletter_'.$page.'_subscribe_success_title');
break;
case 'subscribe_problem': // Subscribe Problem page
$pageTitle = $Localiser->localise('newsletter_'.$page.'_subscribe_problem_title');
break;
case 'unsubscribe_success': // unSubscribe page
$pageTitle = $Localiser->localise('newsletter_'.$page.'_unsubscribe_success_title');
break;
default: // Subscribe page
$pageTitle = $Localiser->localise('newsletter_'.$page.'_subscribe_title');
break;
}
return $pageTitle;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment