Reputation: 289
I would like to access to the Data (Specially the Media data) of the current visible news item outside of the news template. For example in the page template itself.
I hoped to find a ViewHelper in the news extension but there is no.
Currently I only see a way to do it like this somehow:
Read the data via TypoScript and put it in a lib variable and then read it in the fluid template.
Did someone have an alternative, easier way?
Upvotes: 0
Views: 793
Reputation: 10800
It sounds like you want a very special view to your news record. That could be done with a second news plugin as a detail view on your page. As you do not want the text from the default detail view you can build a special layout so you only get the media data.
A plugin can be inserted as a content element in a special column or by typoscript.
Another way would be to do the queries on your own:
Either in typoscript (as a CONTENT
object) or in PHP (as a viewhelper):
Identify the currently shown news by the URL parameter, then select all media related to that record.
Upvotes: 0
Reputation: 89
I think that For this you are need use TypoScript together with ViewHelper
For example:
lib.tx_news.detail {
....something
}
<f:cObject typoscriptObjectPath="lib.tx_news.detail"/>
Upvotes: 0