Tags:
create new tag
view all tags

Question

Does anyone know how to hide the actual links in the template viewtopicactions if the user is a twikiguest. I have tried the following. Not sure how if statements are processed at the template level.

in the viewtopicactionsbuttons.tmpl, I try this

%%IF{"$WIKINAME!='TWikiGuest'" then "TMPL:P{"action_revisions"}"}% 
Not sure if the $WIKINAME is visible to templates?

Any help much appreciated.

Environment

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

-- WillBerger - 05 May 2008

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

See instructions at PatternSkinCustomization.

-- ArthurClemens - 05 May 2008

I follow your link and I've read the comment over and over, and I can't make sense of it. The comment does not explain where one is supposed to make those changes to show the edit button only to registered users, and it does not explain if the "COVER = customer" change is a required component in the same change or a different approach to the same thing. In other words, a more complete explanation would help.

For my part, I'd like it if the diplayed button would be "Login" for the TWikiGuest or "Edit" for a logged in user. Either that, or I would like the "Edit" button to point to a login screen, rather than the error message currently dislayed.

-- PaulJohnson - 22 Sep 2008

  • in the templates directory, create a file for your cover. ie, view.guest.tmpl
  • Put the following content in the file, to remove the action_revisions
%TMPL:INCLUDE{"view"}%
%TMPL:DEF{"action_revisions"}%%TMPL:END%
   * Set COVER=guest

After that, you can further customize your view.guest.tmpl, and those modifications will only affect the non-logged users (ie, TWikiGuests).

-- RafaelAlvarez - 29 Sep 2008

If you use NatSkin it is even easier. You just use the %USERACTIONS{...}% feature and there you go.

-- WolfMarbach - 04 Oct 2008

Closing this question after more than 30 days of inactivity. Feel free to re-open if needed.

-- PeterThoeny - 10 Dec 2008

Change status to:
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2020-04-26 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.