[TYPO3-english] FLUID and News: using global variables in widget of fe. News

bernd wilke t3ng at bernd-wilke.net
Tue Oct 28 08:27:24 CET 2014


Am 27.10.14 19:30, schrieb Bert Hiddink [BENDOO e-work solutions]:
> Hello Bernd,
>
> Thanks for your explaination...
>
> So I will have to work with something like:
> <f:cObject typoscriptObjectPath="lib.myObject"></f:cObject>
> ?

that is one possibility.
the other one is to define a 'news-variable'

plugin.tx_news {
   settings {
     myvar = TEXT
     myvar.value = here I am!
   }
}

all beyond plugin.tx_news.settings is available in the news-template as 
{settings. ...} (e.g. {settings.myvar})
you may find it with:
<f:debug title="here I know:">{_all}</f:debug>
in your news templates.
keep in mind: if you are using partials and sections you need to 
transfer variables as arguments:

<f:render partial="List/Item" arguments="{newsItem: newsItem, 
settings:settings, itemIteration:newsItemIteration}" />

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


More information about the TYPO3-english mailing list