[TYPO3-mvc] Setting a default pageUid for different controllers from typoscript.
Nathan Lenz
typo3 at k9tfk.com
Wed Jan 20 21:45:04 CET 2010
I think it might be a good idea to be able to configure the default
pageUid for a given Controller or Controller/View combination.
Something like this:
plugin.tx_myplugin {
settings {
Blog {
pageUid = 123
actions {
edit = 323
}
}
}
}
OR
plugin.tx_myplugin {
settings {
overridePageUid {
'Blog/*' = 123
'Blog/edit' = 323
}
}
}
OR
plugin.tx_myplugin {
view {
Blog {
pageUid = 123
actions {
edit = 323
}
}
}
}
Whatever would fit best.
This way <f:link.action controller="Blog" ... >some link</f:link.action>
would automatically use pageUid of 123.
Why?
1. To match old URL structures when porting old extensions. The
controller/action can be set in the flexform, so they wouldn't need to
be in the URL. Especially when your extBase extension needs to
integrated into an existing hierarchy of traditional typo3 pages.
2. Access restrictions can by putting specific actions on protected
pages. However, those actions would need to be disabled for non
protected pages to prevent people from hacking the URL and passing
different controller/action parameters to non protected pages. :(
3. It would eliminate the need to use the
pageUid="{settings.alternatePid}" in the viewHelper everywhere in your
template for whatever reason you need to do it.
What do you think? (I'm happy to implement it.)
--Nathan
More information about the TYPO3-project-typo3v4mvc
mailing list