Tags:
create new tag
, view all tags

Question

I would love to make some pages available with only Edittable access while preventing "full" page editing via the "Edit" link and TWiki edit window.

Can I do anything like this?

If not possible (yet) I'd like to request such an enhancement.

it would be, similarly, nice to be able to use CommentPlugin but disallow Edit

Environment

TWiki version: TWikiRelease04x00x05
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories:  

-- VickiBrown - 19 Jan 2007

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

Well one way to do this is to create a modification of the skin you are using to remove those features and then do a Set SKIN = on that page. For example that is the way we created a limited feature version of some pages on our wiki. For example:

http://www.gpstk.org/bin/view/Documentation/WebHome

http://www.gpstk.org/bin/view/Documentation/SystemRequirements

-- RickMach - 24 Jan 2007

That is one way.

Another option is to modify the skin to conditionally show the edit button based on the existence of a variable. See VarIF and IfStatements for details on conditional text. See PatternSkinCustomization entry point.

-- PeterThoeny - 24 Jan 2007

Working under the assumption that IF I can get this to work, I might be ablle to convince the Powers That Be to add a template, I tried to follow the instructions at PatternSkinCustomization. My test is here. APparently I'm doing something wrong.

I created a file named templates/view.noedit.tmpl containing the 3 lines as suggested. Then I

   * Set COVER = %IF{ "$ WIKINAME='VickiBrown'" then="pattern" else="noedit" }%

I see

   • Set COVER = pattern
another user of my TWiki sees
   • Set COVER = noedit
but the Ediit link is still present.

Example page at http://cfcl.com/twiki/bin/view/Sandbox/TestEditLink

What am I doing wrong?

-- VickiBrown - 29 Jan 2007

You must write the template exactly as documented, with INCLUDE "view.pattern" instead of "view":

%TMPL:INCLUDE{"view.pattern"}%
%TMPL:DEF{"topicaction"}%%TMPL:END%
%TMPL:DEF{"toolbar"}%%TMPL:END%

COVER is documented in TWikiSkins#Activating_Skins

But you cannot use %IF% to set a variable. I think the best solution would be to set COVER to noedit in Main.TWikiPreferences, and to set an overriding COVER in your user topic to pattern.

-- ArthurClemens - 30 Jan 2007

> You must write the template exactly as documented,

I did write it (copy/paste) that way. I just double checked. I don't know how the text got munged in my (now fixed) verbatim section of my example page but the actual template is identical to the documented sample.

-- VickiBrown - 30 Jan 2007

> But you cannot use

IF{ }: Empty expression to set a variable.

Oh drat. Well, that would be the problem.

> the best solution would be to set COVER ... in Main.TWikiPreferences, and to set an overriding COVER in your user topic

Actually, "pattern" is the standard. I suppose I could do that but it worries me. It means that somehting i'm trying for one or two pages is causing me to add code that affects everyone in the entire web. I can't accept that.

-- VickiBrown - 30 Jan 2007

Looks like time for a TWIki enhancement request. (Can't use IF to set a variable?????)

-- VickiBrown - 30 Jan 2007

 
Change status to:
Topic revision: r8 - 2007-01-30 - VickiBrown
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.