Fixed links in related tags view
This commit is contained in:
parent
37fdc3057f
commit
8a2e6948bc
2 changed files with 6 additions and 1 deletions
|
@ -346,7 +346,7 @@ function attachTagIt(target)
|
|||
$.each(data.tags, function(i, tag)
|
||||
{
|
||||
var link = $('<a>');
|
||||
link.attr('href', '/posts/' + tag.name + '/');
|
||||
link.attr('href', tag['search-link']);
|
||||
link.text('#' + tag.name);
|
||||
link.click(function(e)
|
||||
{
|
||||
|
|
|
@ -64,8 +64,13 @@ class TagController extends AbstractController
|
|||
array_values(array_map(
|
||||
function($tag)
|
||||
{
|
||||
$searchLink = Core::getRouter()->linkTo(
|
||||
['PostController', 'listView'],
|
||||
['query' => $tag->getName(), 'page' => 1]);
|
||||
|
||||
return [
|
||||
'name' => $tag->getName(),
|
||||
'search-link' => $searchLink,
|
||||
'count' => $tag->getPostCount(),
|
||||
];
|
||||
}, $ret->entities));
|
||||
|
|
Loading…
Reference in a new issue