1

Trying to access a few settings that I've created in my constants.txt file. It looks like this:

plugin.tx_my_ext {
    settings {
        # cat=plugin.tx_my_ext/urgences; type=boolean; label=Activer les urgences
        activerUrgences = 0
    }
}

Then in my setup.txt file I have this:

plugin.tx_my_ext.settings.activerUrgences = {$plugin.tx_my_ext.settings.activerUrgences}

Any reason why I wouldn't be able to access my settings using {settings} in my Fluid layout?

BTW, my extension name does include an underscore _ between the words. I have tried removing the underscore, then removing the tx_, and then a combination of those two.

Any help would be appreciated! Thanks

1 Answer 1

1
  1. For ext with key my_ext it should be plugin.tx_myext.settings
  2. Make sure that you 'Included static from extension' in your TypoScript Template. If your ext is not available on the list add it in ext_localconf.php like that:

    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'MyExt');
    
  3. Do not forget to clear System cache and FE cache at least million times ;)

  4. Use TypoScript object browser to check if on given page your plugins TS is still available (maybe something resets TS in meanwhile:

enter image description here

  1. Finally make sure that you don't clear $this->settings array within your controller, if you do manipulate it for any reason assign it to the view again before view rendering,like that:

    $this->view->assign('settings', $this->settings);
    
Sign up to request clarification or add additional context in comments.

6 Comments

Actually, line #2 was in my ext_tables.php file. Should I also add it to my ext_localconf.php? But you should know that my extension was already in the 'Included static from extension' in my Typoscript template.
No, it;s only in ext_tables.php so there's probably cache issue ' empty the content of typo3temp folder (just delete all files in it, but don't delete folder itself) and check if it helps
no dice. in my setup.txt file i have this line plugin.tx_udmnouvelles.settings.activerUrgences = 1 but on the front on my default template, when I try to access {settings} using `f:debug, I get an empty array
I don't have any controllers (that I know if), so I don't believe I can reset my settings. Also my settings are in the Object Browser
Also, newb question here, but how would I reassign the settings to the view again?
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.