Sebastian
Sebastian

Reputation: 929

TYPO3 Extension Settings to Page Settings

I search for a Solution, how can i give the Ext/Plugin settings to the page settings?

My first Test dont works:

page.10.settings =< plugin.tx_tester.settings

Upvotes: 0

Views: 465

Answers (2)

sebkln
sebkln

Reputation: 1375

It seems that you can't use TypoScript references for settings, but only for cObjects.

From the TypoScript documentation:

References are only resolved for Content Objects, otherwise references are not resolved. For example, you cannot use a reference < plugin.tx_example.settings.foo to find the value of foo. The value you get will be just < plugin.tx_example.settings.foo instead.

The provided example shows the copy operator <, but I'd consider this a typo in the docs.


Source: https://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/8.7/Syntax/TypoScriptSyntax/Index.html#references-the-sign

Upvotes: 1

Heinz Schilling
Heinz Schilling

Reputation: 2252

There is no page.10.settings: https://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Page/Index.html#

May you mean something like:

page = PAGE
page {
   10 = FLUIDTEMPLATE
   10 {
      file = EXT:site_default/Resources/Private/Templates/MyTemplate.html
      settings {
         copyrightYear = 2013
      }
   }
}

https://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Fluidtemplate/Index.html?highlight=settings#settings

Then this should work

page = PAGE
page {
   10 = FLUIDTEMPLATE
   10 {
      settings < plugin.tx_tester.settings
   }
}

Upvotes: 1

Related Questions