This question about Configuration: Answered
Now I am wondering if it is possible to hide this code from other Users, or should I place it somewhere else?
I need to react on events occurring inside the topic.
Happy New Year
You can handle requirements like this using a View Template. See /System.PatternSkinCustomization#The_topic_template_approach_40using_VIEW_TEMPLATE_41
. You can set the view template in the individual topic or web depending on requirements. If you don't want the set to clutter the edit, use the More topic actions
link to set it in the topic settings. If the topic has a form attached, you can also use the AutoViewTemplatePlugin
to associate a custom view template with any topic using the form.
- 03 Jan 2012
Thank you for the fast answer. I managed to hide the script the first way you suggested. The RENDERZONE macro still remains, but I think this is inevitable and its is okay for me.
But I have one more follow up question:
Is it possible to have some text (headings) in a topic, which users can see when editing but cant edit/delete?
I want to create a type of topics which content is divided into two sections and users should be able to edit the content of the sections but not the headings.
When I put the headings in the viewtemplate they cant be seen when editing. When I put them in the edittemplate they are editable.
Kilian, Not anyway that I can think of off hand - but there are others better at this. If you don't get more answers here you could stop in on the #foswiki channel on IRC. Sometimes it's easier to explain what you want in a q&a format.
- 11 Jan 2012
thanks again. I set the status of this question to "Answered", because the original question was answered.