-
-
Save georgringer/5a86262054a5d9bacee0197e1344d8e1 to your computer and use it in GitHub Desktop.
Render news with same tags, using VHS+news
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{f:render(section:'tagIds',arguments:_all) -> f:spaceless() -> v:variable.set(name: 'tagIds')} | |
<f:if condition="{tagIds} != ''"> | |
<h4> | |
<f:translate extensionName="theme" key="news.related-news"/> | |
</h4> | |
<f:cObject typoscriptObjectPath="lib.tx_news.relatedByTags" data="{pid:newsItem.pid,tags:tagIds,actualNewsUid:newsItem.uid}"/> | |
</f:if> | |
<f:section name="tagIds"> | |
<f:for each="{newsItem.tags}" as="tag">{tag.uid},</f:for> | |
</f:section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lib.tx_news.relatedByTags = USER | |
lib.tx_news.relatedByTags { | |
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run | |
extensionName = News | |
pluginName = Pi1 | |
vendorName = GeorgRinger | |
switchableControllerActions { | |
News { | |
1 = list | |
} | |
} | |
settings < plugin.tx_news.settings | |
settings { | |
templateLayout = tagRelated | |
useStdWrap := addToList(startingpoint,tags,hideIdList) | |
startingpoint.field = pid | |
tags.field = tags | |
hideIdList.field = actualNewsUid | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment