[TYPO3-dev] restrict avail. doktypes depending on parent doktype
Johannes Konert
johanneskonert at gmx.de
Fri Aug 11 16:55:00 CEST 2006
Hello list members,
it always annoys me that you can put a normal or standard page inside of
sysfolder-pages. That makes no sense in most of my scenarios.
Thus I want to restrict which sub-pages can be created depending on the
parent type (more precisely: depending on the page's doktype where you
clicked "new").
I could not find any extension or TSConfig doing that, thus I wanna
write a new extension.
I am new to BE-extension coding thus wanna get your advice :-)
My solution will be:
- I'll use the new Hook
['t3lib/class.t3lib_tceforms.php']['getMainFieldsClass'], which was
introduced for dynaflex.
- the restrictions can be configured similar to htaccess in pageTSConfig
and UserTSConfig (where user overrides page)
plugin.subdoktypes.top.allow = ALL
plugin.subdoktypes.top.deny = NONE
plugin.subdoktypes.2.allow = 3,4,5
plugin.subdoktypes.255.deny = ALL
..and so on.
Question: Is plugin.[myext] the right place for PageTSConfig and
UserTSConfig to put my parameters =
The code will do just these steps:
- checking that it's the page-table
- getting UserTS and pageTS (merging them)
- modify $PAGE_TYPES acordingly (using dynaflex)
Thus the BE form will only display the allowed types.
Thanks for your feedback.
Regards
Johannes
More information about the TYPO3-dev
mailing list