Skip to content

Commit

Permalink
merge metat title when set
Browse files Browse the repository at this point in the history
  • Loading branch information
Pele Odiase committed May 10, 2017
1 parent 95de370 commit 548b42d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/PageBuilder/PageMetaData.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

namespace PageBuilder;

use Zend\Stdlib\AbstractOptions;
Expand Down Expand Up @@ -186,6 +187,10 @@ public function getMetaDescription()
$this->metaDescription = $this->description;
}

if (!$this->metaDescription) {
$this->metaDescription = $this->getMetaTitle();
}

return $this->metaDescription;
}

Expand All @@ -207,6 +212,9 @@ public function getMetaKeywords()

public function setMetaTitle($metaTitle)
{
if ($this->metaTitle) {
$metaTitle = $this->metaTitle . ' - ' . $metaTitle;
}
$this->metaTitle = $metaTitle;

return $this;
Expand Down

0 comments on commit 548b42d

Please sign in to comment.