So i've just wrote my first extension for Typo3. I started off with the Kickstarter and everything went fine.
I want to start using templates now but I'm unable to access the TSconfig data from code. By this I mean the data in the files constants.txt, editorcfg.txt and setup.txt.
In an extension copied from a colleague I am able to use die(print_r($config)) to reveal all the data in the config file. It starts off with includeLibs and userFunc but contains a lot more data specified in the files also.
But when I do this for my extension I just get includeLibs, userFunc and nothing else.. I have copied the filestructure/and path from the other extension. I have also searched most files for config and can't seem to find where the it is being told to look for the TSConfig data.
Any ideas on how I can fix this? Maybe it's something that's needs to be setup in the Kickstarter?
Thanks in advance开发者_如何学运维..
--Conor
First of all : it's not TSconfig in setup.txt, it's static TypoScript.
Second : You shold have setup.txt & constants.txt EXT:yourext/static folder before to add it via ext_tables.php.
t3lib_extMgm::addStaticFile('yourext','static/','Static Typoscript of Yourext');
Third : remember to include static templates via You TypoScript template in BE.
Ok, so here's the solution:
Add the following line to the file *ext_tables.php* in the extension root:
t3lib_extMgm::addStaticFile($_EXTKEY,'pi1/static/','Config To Appear In T3 BE');
精彩评论