Skip to content

Commit

Permalink
update expTags show metainfo to standardize page title
Browse files Browse the repository at this point in the history
  • Loading branch information
dleffler committed Mar 3, 2017
1 parent d54f582 commit d092c03
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions framework/modules/core/controllers/expTagController.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,35 @@ function change_tags() {
expHistory::returnTo('viewable');
}

/**
* get the metainfo for this module
*
* @return array
*/
function metainfo() {
global $router;

if (empty($router->params['action']))
return false;

// figure out what metadata to pass back based on the action we are in.
switch ($router->params['action']) {
case 'show':
$metainfo = array('title' => '', 'keywords' => '', 'description' => '', 'canonical' => '', 'noindex' => false, 'nofollow' => false);
$tag = $router->params['title'];
// set the meta info
$metainfo['title'] = ucwords(gt('items')) . ' ' . gt('tagged') . ': ' . $tag;
$metainfo['keywords'] = SITE_KEYWORDS;
$metainfo['description'] = SITE_DESCRIPTION;
$metainfo['canonical'] = $router->plainPath();
return $metainfo;
break;
default:
$metainfo = parent::metainfo();
}
return $metainfo;
}

function import() {
assign_to_template(array(
'type' => $this
Expand Down

0 comments on commit d092c03

Please sign in to comment.