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

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.nl
Tue Oct 28 09:02:01 CET 2014


Hello Bernd,

Thanks for your mail...

Concerning:

On 28-10-14 08:27, bernd wilke wrote:
> 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!
>    }
> }

I had tried that route but this did not work so I switched to 
"lib.myObject"... However, thanks to your explaination, I noticed that I 
missed to pass "settings: settings" as an argument.

So I added:
<f:render section="paginator" arguments="{pagination: 
pagination,configuration:configuration,settings:settings}" />

some HTML
{settings.myvar}
some HTML

However, this prints "Array"

So what is going wrong here?

Thanks again!

Regards,
Bert

> 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



More information about the TYPO3-english mailing list