[TYPO3] A small typoScript problem

Bing Du bdu at iastate.edu
Tue Mar 20 16:29:11 CET 2007


Hi,

> Hi
>
> I have a news plugin in my TS setup like this:
>
> lib.importantNews < plugin.tt_news
> lib.importantNews {
> code >
> code = latest
> pid_list >
> pid_list = 16
> latestLimit = 1
> templateFile = fileadmin/templates/tt_news_v2_template.html
> singlePid =
> categoryMode = 2
> categorySelection = 6
> }
>
> I want to be able to give a non-admin user permission to change the
> categorySelection number.
>
> Now, as far as I know a non-admin user cant access the TS setup, so Im
> working on a workaround. I thought I could do something like this:
>
> temp.10 = TEXT
> temp.10.data = subtitle
> categorySelection < temp.10
>
> and then the user could type in the number in the subtitle field(or a
> new field I will create) in the page header.
>
> But this does not work. Im thinking it has something to do with the fact
> that the categorySelection property expects an integer and the subtitle
> is a string, but im not sure how or if its possible to convert it.
>
> Maybe there is a more clever way to do what I want, any comment is
> welcome.
>
> /Brian Bendtsen

I'd set up a constant like 'categoryselection = xx' in a file
fileadmin/some/dir/constants.tmpl.

Then put the following line in the Constant box of the template record.

<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/some/dir/constants.tmpl">

Non-admin users should be able to change the file constants.tmpl under
File->Filelist

lib.importantNews {
  blahblah
  categorySelection = {$categoryselection}
}

Bing


More information about the TYPO3-english mailing list