Skip to content

Commit

Permalink
add ability to put defaults.title before page title (artesaos#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
kurumbus authored and vinicius73 committed Aug 12, 2019
1 parent 21861d1 commit ec393d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/SEOTools/SEOMeta.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,12 @@ protected function parseTitle($title)
{
$default = $this->getDefaultTitle();

return (empty($default)) ? $title : $title.$this->getTitleSeparator().$default;
if (empty($default)) {
return $title;
}
$defaultBefore = $this->config->get('defaults.titleBefore', false);

return $defaultBefore ? $default.$this->getTitleSeparator().$title : $title.$this->getTitleSeparator().$default;
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/resources/config/seotools.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
'defaults' => [
'title' => "It's Over 9000!", // set false to total remove
'titleBefore' => false, // Put defaults.title before page title, like 'It's Over 9000! - Dashboard'
'description' => 'For those who helped create the Genki Dama', // set false to total remove
'separator' => ' - ',
'keywords' => [],
Expand Down

0 comments on commit ec393d3

Please sign in to comment.