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

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.nl
Mon Oct 27 19:30:49 CET 2014


Hello Bernd,

Thanks for your explaination...

So I will have to work with something like:
<f:cObject typoscriptObjectPath="lib.myObject"></f:cObject>
?

Regards,
Bert


On 27-10-14 16:44, bernd wilke wrote:
> Am 27.10.14 16:25, schrieb Bert Hiddink [BENDOO e-work solutions]:
>> Hello,
>>
>>
>> I am using TYPO3 6.2.x and News, there is a widget for pagination,
>> something like this:
>>
>> ...
>> {namespace n=Tx_News_ViewHelpers}
>>
>> <f:if condition="{configuration.insertAbove}">
>>      <f:render section="paginator" arguments="{pagination:
>> pagination,configuration:configuration}" />
>> </f:if>
>>
>> <div class="{someGlobalVar}"
>> <f:renderChildren arguments="{contentArguments}" />
>> </div>
>> <f:if condition="{configuration.insertBelow}">
>>      <f:render section="paginator" arguments="{pagination:
>> pagination,configuration:configuration}" />
>> </f:if>
>
> this ^ is from news-template?
>
>> And then in the TS-template:
>>
>> page {
>>    10 = FLUIDTEMPLATE
>>    10 {
>>        variables {
>>          someGlobalVar=TEXT
>>          someGlobalVar.value=foo
>>        }
>>    }
>> }
>
> this ^ is global page rendering
>
>> However, {someGlobalVar} does not print anything...
>> Is there something wrong with the code or do I miss something?
>
> variables are known only in their context. while rendering a news view
> global variables are not known (except you have transfered them
> explicit). It is like any partials/sections.
>
>
> what variables are known you can debug with the fluid-snippet:
> <f:debug title="here I know:">{_all}</f:debug>
>
> bernd



More information about the TYPO3-english mailing list