[TYPO3-ttnews] [tx_news] list-view on detail page - how to get categories of detailpage?

bernd wilke t3ng at bernd-wilke.net
Tue Apr 28 12:17:00 CEST 2015


Am 28.04.15 um 11:16 schrieb Manuel Bachl:
> Hi Bernd,
> the first solution will fit my needs!
> Do you think this would be possible for tags too?

AFAIK there is no automatic detail-view-page for tags, so you can not 
use the first approach for display by tag.

a third option came to mind:

put all into one template:
use just one list-plugin

the template contains two foreach: first one only neccessary for 
displaying the details-record:

<div class="main">
<f:for each="news-records" as="newsRecord">
    <f:if condition="{newsRecord.uid} == {detailUid}">
	:
	...display full record...
	:
	<v:variable.set name="currentCategory">
		{newsrecord.categories...}
	</v:variable.set>
	<v:variable.set name="currentTag">
		{newsrecord.tag...}
	</v:variable.set>
   </f:if>
</f:for>
</div>

<div class="border">
<f:for each="news-records" as="newsRecord">
    <f:if condition="{newsRecord.category} == {currentTag}">
	:
	...display usual teaser for news...
	:
   </f:if>
</f:for>

bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-project-tt-news mailing list