Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Fix #5: tag link viewhelper creates a wrong link outside of EXT:blog plugins #6

Merged
merged 2 commits into from
Feb 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Link/ArchiveViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function render(): string
->setFormat('rss')
->setTargetPageType($this->getTypoScriptFrontendController()->tmpl->setup['blog_rss_archive.']['typeNum']);
}
$uri = $uriBuilder->uriFor('listPostsByDate', [], 'Post');
$uri = $uriBuilder->uriFor('listPostsByDate', [], 'Post', 'Blog');
if ($uri !== '') {
$this->tag->addAttribute('href', $uri);
$this->tag->setContent($this->renderChildren());
Expand Down
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Link/AuthorViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ protected function buildUriFromDefaultPage(Author $author, bool $rssFormat)
$rssFormat
);

return $this->buildAnchorTag($uriBuilder->uriFor('listPostsByAuthor', [], 'Post'), $author);
return $this->buildAnchorTag($uriBuilder->uriFor('listPostsByAuthor', [], 'Post'), $author, 'Blog');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Link/CategoryViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function render(): string
->setFormat('rss')
->setTargetPageType($this->getTypoScriptFrontendController()->tmpl->setup['blog_rss_category.']['typeNum']);
}
$uri = $uriBuilder->uriFor('listPostsByCategory', [], 'Post');
$uri = $uriBuilder->uriFor('listPostsByCategory', [], 'Post', 'Blog');

if ($uri !== '') {
$linkText = $this->renderChildren() ?: $category->getTitle();
Expand Down
2 changes: 1 addition & 1 deletion Classes/ViewHelpers/Link/TagViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function render(): string
->setFormat('rss')
->setTargetPageType($this->getTypoScriptFrontendController()->tmpl->setup['blog_rss_tag.']['typeNum']);
}
$uri = $uriBuilder->uriFor('listPostsByTag', [], 'Post');
$uri = $uriBuilder->uriFor('listPostsByTag', [], 'Post', 'Blog');
if ($uri !== '') {
$linkText = $this->renderChildren() ?: $tag->getTitle();
$this->tag->addAttribute('href', $uri);
Expand Down