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
--
WillBerger - 05 May 2008
Answer
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