[TYPO3] A small typoScript problem

Brian Bendtsen nightowl at galnet.dk
Wed Mar 21 08:43:12 CET 2007


Bing Du skrev:
> 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
Hi Bing

If possible I like my method better and I think my users will too. 
Besides, the whole idea, which I didn't mention before, is to let the 
super user create a copy of the page which includes this TS setup and 
likewise create a new news category.

Im dealing with a company with several branches and each branch have 
their own site(their own logo, layout images and newscategory) in the 
overall site. The Super user would like it if he could create a new page 
for a new branch.

Hopes this explaines my problem.

/BB


More information about the TYPO3-english mailing list