[Typo3-dev] New extension: Get TypoScript setup in BE / Small bug in templateSelector
Gregor Kaczmarczyk
gregor at crazes.de
Tue Sep 9 14:36:05 CEST 2003
Hi group :)
i´m working on my first extension "Paragraphs" and need a hint to find the
right direction.
The goal for this extension is to have several "paragraphs" (HTML snippet,
each in one file) for different content elemets (with markers). (the given
content elements are sometimes too general ;).
All paragraphs are stored in one directory (paragraphs/par1.html,
paragraphs/par2.html, paragraphs/par3.html... )
The extension is a plugin (mostly extension of tt_content with frontend
output). In backend i try to read out all "paragraph" files from the
directory and have a selctorbox, where i can select one paragraph (very
similar to templateSelector).
so i need a "itemsProcFunc" for filling the selectorbox.
I want to have the path to "paragrpahs" directory configured with TS Setup
so i put in ext_typoscript_setup.txt
plugin.tx_aggparagraphs_pi1 {
paragraphsDirectory = EXT:agg_paragraphs/par/
}
Problem: How to retrieve the value "paragraphsDirectory" in my
"itemsProcFunc"?
Comment on templateSelector
---------------------------------
I´ve dived in the source of TemplateSelector, but i think it´s not possible
to make it the same way for my extension.
Behavior in TemplateSelector:
If you create a new page, you have no possibility to change the main and sub
templates, because selectboxes are blank.
The reason is that the plugin needs the pid (on new pages obviously no pid
is set) to retrieve the data from TypoScript setup.
Only after first saving, selection of (main&sub) templates is possible (pid
set).
If the path would be set directly in the extension code (disadvantage: no
configuration by user) the plugin would work properly.
If path is configured by typoscript, the new page doesn´t know about set
configuration in TypoScript.
I´ve no idea how this problem can be solved as i´m new to typo3.
Maybe somebody knows the solution.
---------------------------------
I hope you can help me to retrieve the data from TS setup.
I hope this extension can also be useful for other typo freaks :)
Iwould like to publish it as soon as possible.
Ciao, Gregor
More information about the TYPO3-dev
mailing list