[TYPO3-ect] lib/div SVN: customizing pager not possible?
Franz Koch
typo.removeformessage at fx-graefix.de
Thu Dec 20 21:18:30 CET 2007
Hi Sebastian,
I was finally able to override the template by setting a different
setupPath in the pagers controller, but's not the best solution I think.
> i must guess, but i think you can configure it with the normal setupPath the
> name should be
> 'templateFile' and the path get's set with 'templateDirectory'. All is set
> in tx_lib_pager and tx_lib_pager_controller so maybe you can find more in
> there.
Well, yes and no. It should work as long as the pager template is
located in the same directory as your other templates and for the case
you don't use the TS-variable 'templateFile' for your own plugin.
But be honest - normally a pager should look the same for most of the
extensions used on a website, and I think most of us will group the
templates of a extension in subfolders and not 40 different templates in
one folder. So you must be able to tell the pager which template it has
to use and in which directory it is located. And that should not be
something you have to hack in your controller class - this has to be
possible by default for every lib/div extension from within TS, so that
any other developer using your extension can easily apply his
pager-style without xclassing or whatever.
So I think there has to be found a different solution. Maybe simply
using a fixed subset namespace for the pager, like:
----------
plugin.yourExtName.setup {
templateDirectory = EXT:whatever/templates/
resultsPerView = {$plugin.yourExtName.resultsPerView}
templates {
listView = listView.php
detailView = detaiView.php
}
pager {
templateDirectory = fileadmin/whatever/
templateFile = pager.php
resultsPerView = {$plugin.yourExtName.resultsPerView}
}
}
-----------
or a default lib/div settings for the pager and other common lib/div
features that could be overridden inside the controllers mesh or
setupPath like:
tx_lib.setup {
pager {
templateDirectory = fileadmin/whatever/
templateFile = pager.php
resultsPerView = {$plugin.tx_lib.defaultResultsPerView}
}
// also nice would be a default preset for the renderengine the
websiteadmin likes to use, like php, smarty, etc.
renderer {
renderEngine = php
// maybe some other settings
}
// maybe also provide global dictionaries for usage in the translator
of any lib/div extension
globalDictionaries {
abrevations = fileadmin/dictionaries/abrevation.xml
commonWords = fileadmin/dictionaries/commonWords.xml
_LOCAL_LANG.default {
detailLink = read more...
previous = < previous
next = next >
headline_note = please note:
member_singular = member
member_plural = member
member_personal = members
}
}
}
What do you guys think? I'd really prefer if TYPO3 would finally get a
basic configuration possibility for all new extensions. To take it a bit
further, it'll be nice if all lib/div based extensions would provide
very flexible hooks by default (pre and post processing, other
manipulations), so every lib/div
class/operator/controller/howeverYouCallIt could provide some basic
hooks for general manipulation. But that' a different topic we probably
should discuss in a new topic. Feel free to start one if you are also
interested in such things.
--
Greetings,
Franz
More information about the TYPO3-team-extension-coordination
mailing list