[TYPO3-mvc] Feature: automatic target page determination
Franz Koch
typo3.RemoveForMessage at elements-net.de
Tue Aug 3 18:50:03 CEST 2010
Hey Bastian,
> Now some questions to you (please don't hesitate to reply, every
> feedback is welcome):
>
> - Is this too much magic?
in my eyes, it definitely is. The auto-detection via DB is simply too
much in my eyes. And it won't work with extensions having only 1 extKey
but different views. Also I'm not a fan of flooding the "create new
content" wizard with tons of plugins only there to display a certain
view of the very same extension/task.
> - What happens if more than one registered plugin is configured to
> handle the specified Controller & action (suggestion: Exception "more
> than one plugin is configured to handle this request, specify
> 'pluginName' argument")
>
> - What happens if the target plugin is not present in the page tree
> (suggestion: Exception "you need to insert the plugin 'PostSingle' in
> order to call the 'show' action of the 'PostController'", or ignore)
>
> - What happens if the target plugin is installed more than once in the
> page tree? (suggestion: Exception "'PostSingle' plugin is used more than
> once, please specify 'pageUid' argument or set
> 'tx_blogexample_postsingle.view.defaultPid' to a fixed page id")
This is all related to the db magic which I dislike due to those
problems. You can't autodetect this in a easy way for all usecases, so
better don't even try it at all. And btw. all the db detection magic
won't work with referenced content of TemplaVoila or TS instances of
plugins.
> - Though I'm quite confident about the general approach, I'm not
> perfectly happy with the implementation yet. Especially the two static
> functions in Tx_Extbase_Utility_Extension and the DB call in
> getTargetPidByPluginSignature(). Do you have some refactoring suggestions?
I'm fine with moving the view Pid configuration stuff from "settings"
(where most people store it currently) to the "view" namespace, but
those configuration options should then also be accessible form inside
the view/template - even if they should not be needed by default, but
you never know.
Another thing that should be considered are different PIDs per
controller/action of the same plugin, so the auto-detection should check
for a special PID for the given controller/action first and fallback to
the default PID.
plugin.tx_myext {
view.pageIDs {
default = {$plugin.tx_myext.should.be.set.by.a.constant}
controllerName {
search = 123
list = 125
details = 124
}
anotherController {
edit = 104
}
}
}
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list