Permalink
Browse files

Add specific title for author posts list. Change page_title and meta …

…title for category, tag and author posts list
  • Loading branch information...
felixgilles committed Jan 21, 2014
1 parent 1835fbf commit f0972c92f08a665942acfa8e0a6021f2598a3b5f
Showing with 17 additions and 0 deletions.
  1. +12 −0 classes/controller/front.ctrl.php
  2. +5 −0 views/front/post/list_title.view.php
@@ -301,6 +301,10 @@ public function display_list_tag()
'href="'.\Nos\Tools_Url::encodePath($rss_url).'">'
);
$page = $this->main_controller->getPage();
$this->main_controller->setTitle($page->page_title.' - '.strtr(__('Tag: {{tag}}'), array('{{tag}}' => $tag->tag_label)));
$page->page_title = strtr(__('Tag: {{tag}}'), array('{{tag}}' => $tag->tag_label));
return View::forge('noviusos_blognews::front/post/list', array(
'posts' => $posts,
'type' => 'tag',
@@ -325,6 +329,10 @@ public function display_list_category()
'href="'.\Nos\Tools_Url::encodePath($rss_url).'">'
);
$page = $this->main_controller->getPage();
$this->main_controller->setTitle($page->page_title.' - '.strtr(__('Category: {{category}}'), array('{{category}}' => $category->cat_title)));
$page->page_title = strtr(__('Category: {{category}}'), array('{{category}}' => $category->cat_title));
return View::forge('noviusos_blognews::front/post/list', array(
'posts' => $posts,
'type' => 'category',
@@ -352,6 +360,10 @@ public function display_list_author()
'href="'.\Nos\Tools_Url::encodePath($rss_url).'">'
);
$page = $this->main_controller->getPage();
$this->main_controller->setTitle($page->page_title.' - '.strtr(__('Author: {{author}}'), array('{{author}}' => $author->fullname())));
$page->page_title = strtr(__('Author: {{author}}'), array('{{author}}' => $author->fullname()));
return View::forge('noviusos_blognews::front/post/list', array(
'posts' => $posts,
'type' => 'author',
@@ -22,6 +22,11 @@
'text' => e(strtr(__('Category: {{category}}'), array('{{category}}' => $item->cat_title)))
));
}
if ($type == 'author') {
$title = $item->htmlAnchor(array(
'text' => e(strtr(__('Author: {{author}}'), array('{{author}}' => $item->fullname())))
));
}
if ($title !== null) {
echo '<h1>'.$title.'</h1>';
}

0 comments on commit f0972c9

Please sign in to comment.