Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
php-cuong committed Nov 28, 2017
1 parent f5eb14e commit bbbcef3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions Block/Category/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @Author Ngo Quang Cuong <[email protected]>
* @Date 2016-12-20 23:13:15
* @Last modified by: nquangcuong
* @Last Modified time: 2017-11-28 18:11:42
* @Last Modified time: 2017-11-28 19:25:54
*/

namespace PHPCuong\Faq\Block\Category;
Expand Down Expand Up @@ -119,21 +119,21 @@ protected function _prepareLayout()

$faqCategory = $this->getFaqCategory();

$this->_faqCategoryTitle = $faqCategory['title'];
$this->_faqCategoryTitle = __($faqCategory['title']);

$this->_faqCategoryIcon = $faqCategory['image'];

$breadcrumbsBlock->addCrumb(
'faq.category',
[
'label' => $faqCategory['title'],
'title' => $faqCategory['title']
'label' => __($faqCategory['title']),
'title' => __($faqCategory['title'])
]
);

$this->pageConfig->setKeywords($faqCategory['meta_keywords']? $faqCategory['meta_keywords'] : $faqCategory['title']);
$this->pageConfig->setKeywords($faqCategory['meta_keywords']? __($faqCategory['meta_keywords']) : $this->_faqCategoryTitle);

$this->pageConfig->setDescription($faqCategory['meta_description']? $faqCategory['meta_description'] : $faqCategory['title']);
$this->pageConfig->setDescription($faqCategory['meta_description']? __($faqCategory['meta_description']) : $this->_faqCategoryTitle);

return parent::_prepareLayout();
}
Expand Down
8 changes: 4 additions & 4 deletions Block/Question/Question.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @Author Ngo Quang Cuong <[email protected]>
* @Date 2016-12-18 15:27:53
* @Last modified by: nquangcuong
* @Last Modified time: 2017-11-28 18:09:15
* @Last Modified time: 2017-11-28 19:26:53
*/

namespace PHPCuong\Faq\Block\Question;
Expand Down Expand Up @@ -169,15 +169,15 @@ protected function _prepareLayout()
if ($identifier = $faqCategory->getCategoryIndentifier()) {
$link = $this->_storeManager->getStore()->getBaseUrl().Faq::FAQ_CATEGORY_PATH.'/'.$identifier.Faq::FAQ_DOT_HTML;

$this->_faqCategoryTitle = '<a href="'.$link.'">'.$faqCategory->getTitle().'</a>';
$this->_faqCategoryTitle = '<a href="'.$link.'">'.__($faqCategory->getTitle()).'</a>';

$this->_relatedQuestion = $this->_questionHelper->getRelatedQuestion($faq->getFaqId(), $faqCategory->getCategoryId());

$breadcrumbsBlock->addCrumb(
'faq.category',
[
'label' => $faqCategory->getTitle(),
'title' => $faqCategory->getTitle(),
'label' => __($faqCategory->getTitle()),
'title' => __($faqCategory->getTitle()),
'link' => $link
]
);
Expand Down
6 changes: 3 additions & 3 deletions Controller/Category/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @Author Ngo Quang Cuong <[email protected]>
* @Date 2016-12-21 16:15:56
* @Last modified by: nquangcuong
* @Last Modified time: 2017-01-05 09:08:38
* @Last Modified time: 2017-11-28 19:30:54
*/

namespace PHPCuong\Faq\Controller\Category;
Expand Down Expand Up @@ -58,9 +58,9 @@ public function execute()
if ($category = $this->_faqCatResourceModel->getFaqCategoryStore($id, $textSearch)) {
$resultPage = $this->_resultPageFactory->create();

$resultPage->getConfig()->getTitle()->set(__('FAQ'));
$resultPage->getConfig()->getTitle()->set(__('FAQs'));

$resultPage->getConfig()->getTitle()->prepend($category['title']);
$resultPage->getConfig()->getTitle()->prepend(__($category['title']));

return $resultPage;
}
Expand Down

0 comments on commit bbbcef3

Please sign in to comment.