[TYPO3-ttnews] tx_news - detail from news or pid
Frans Saris
franssaris at gmail.com
Fri Sep 19 13:46:24 CEST 2014
2014-09-18 21:55 GMT+02:00 Jan Slusarczyk <jan.slusarczyk at gmail.com>:
> Hi Frans,
>
> You can define default selected categories for each storage folder with
>> pageTs. Also you can restrict the visible category tree to a certain root
>> point.
>>
>
> This is what I'm researching now. I hope it will work with sitewide
> categories of typo3 6.2.
to restrict the category tree:
TCEFORM.tx_news_domain_model_news.categories.config.treeConfig.rootUid =
ROOT_CAT_UID
to set defaults:
TCAdefaults.tx_news_domain_model_news.categories =
COMMA_SEPERATED_LIST_OF_IDS
> An other solution could be to add a switch to your template with newsitem
>> pid as value. An then define a different pageUid for each newsItem pid.
>>
>
> But this one is new for me. Can you give me an example of how to do this?
>
<f:switch expression="{newsItem.pid}">
<f:case value="10">
<f:link.action action="detail" pageUid="1" arguments="{news:newsItem}">
{newsItem.title}
</f:link.action>
</f:case>
<f:case value="11">
<f:link.action action="detail" pageUid="2" arguments="{news:newsItem}">
{newsItem.title}
</f:link.action>
</f:case>
<f:case default="TRUE">
<n:link newsItem="{newsItem}" settings="{settings}">
{newsItem.title}
</n:link>
</f:case>
</f:switch>
The linkViewHelper of ext:news doesn't support pageUid so you need to use
the normal link viewHelper or create a own extend of the news
linkViewHelper.
> Thank you!
>
> Jan
>
Your welcome :)
gr. Frans
More information about the TYPO3-project-tt-news
mailing list