Last active
November 21, 2016 13:24
-
-
Save ulrikkold/7a16f56eb8e637a6f639 to your computer and use it in GitHub Desktop.
Including an overwriteDemand GET param with TYPO3 Fluid and tx_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
{namespace n=Tx_News_ViewHelpers} | |
<section> | |
<f:for each="{news}" as="newsItem" iteration="iterator"> | |
<n:link | |
newsItem="{newsItem}" | |
settings="{settings}" | |
configuration="{additionalParams: '&tx_news_pi1[overwriteDemand][categories]={f:for each=\"{newsItem.categories}\" as=\"category\" iteration=\"categoryIteration\">{category.uid}<f:if condition=\"{categoryIteration.isLast}\"><f:then></f:then><f:else>,</f:else></f:if></f:for>'}"> | |
{newsItem.title}</n:link> | |
</f:for> | |
</section> | |
<f:comment>The expected result of the above is a link to a detail view with the &tx_news_pi1[overwriteDemand][categories]=a,b,..n GET param attached. However, right now all I get is an exception telling me my template has the wrong number of opening tags to match my closing tags.</f:comment> |
Well, no wonder that you got an exeption about tag mismatch. There is no opening section tag in your template, but a closing one.
I updated the snippet to include a section start tag.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, I finally found a solution: Use ext:vhs and use v:iterator to create the right csv-string for the GET param.