[TYPO3-english] Script parameters without using template extensions

Florian Grelak florian_grelak at realbigflo.de
Tue Jul 28 11:36:15 CEST 2009


Hi everybody,

I have a small problem with the use of a (private) external script, 
which is parametrized per page.

To be more precise:
Script: foo.php with function "bar" and parameters year and id.
My page tree looks like (in brackets the parameter values):

main
|- History
||- team 1
|||- year 2008/2009 (2009, x)
|||- year 2007/2008 (2008, y)
|||- year 2006/2007 (2007, z)
||- team 2
|||- year 2008/2009 (2009, a)
|||- year 2007/2008 (2008, b)
|||- year 2006/2007 (2007, c)
|- Teams
||- team 1 (2010, f)
||- team 2 (2010, g)

You see, in the next year, I will copy the current team page into the 
history and rename it, but the parameters will be untouched.

Currently, I have for every page an extension template with the parameters:

includeLibs.user_teamtables = foo.php
lib.teamtables = USER
lib.teamtables.userFunc = bar
lib.teamtables.userYear = year
lib.teamtables.userID = id

That works fine but is a lot of maintenance for me (the admin ;-) ), 
because for every new page I have to create a new extension. At least, I 
want to get rid of it and probably "move" only the setting of parameter 
values into the page creation, so that the page editors can edit the 
year and id.
Do you know any way to get it work?

I imagine something like a "master" extension template (e.g. in "Teams" 
and "History") which looks like:

includeLibs.user_teamtables = foo.php
lib.teamtables = USER
lib.teamtables.userFunc = bar

and then the page editor (who has no access rights to edit the template) 
adds the values in some kind of editing field in the page properties.

Is something like that possible? Or do you have any other good idea?

Kind regards,
Florian


More information about the TYPO3-english mailing list