Skip to content

Instantly share code, notes, and snippets.

@tamouse
Created June 22, 2013 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tamouse/5841099 to your computer and use it in GitHub Desktop.
Save tamouse/5841099 to your computer and use it in GitHub Desktop.
Controlling which page actions are displayed by testing for authorization
(:Summary:Contains the '[[PmWiki/AvailableActions|action]]' links (like Browse, Edit, History, etc.), placed at the top of the page, see [[PmWiki/site page actions]]:)
(:comment This page can be somewhat complex to figure out the first time you see it. Its contents are documented at PmWiki.SitePageActions if you need help. :)
* %list class="nav nav-pills"%%item rel=nofollow class=browse accesskey='$[ak_view]'% [[{*$FullName} | $[View] ]]
(:if auth edit:)
* %item rel=nofollow class=edit accesskey='$[ak_edit]'% [[{*$FullName}?action=edit | $[Edit] ]]
* %item rel=nofollow class=upload accesskey='$[ak_attach]'% [[{*$FullName}?action=upload | $[Attach] ]]
* %item rel=nofollow class=copy accesskey='$[ak_copy]% [[{*$FullName}?action=copy | $[Copy/Move] ]]
(:ifend:)
* %item rel=nofollow class=print accesskey='$[ak_print]'% [[{*$FullName}?action=print | $[Print] ]]
* %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$FullName}?action=search&q=link={*$FullName} | $[Backlinks] ]]
* %item rel=nofollow class=source accesskey='$[ak_source]'% [[{*$FullName}?action=source | $[Source] ]]
* %item rel=nofollow class=diff accesskey='$[ak_history]'% [[{*$FullName}?action=diff | $[History] ]]
(:if authid:)
* %item rel=nofollow class=logout accesskey='$[ak_logout]' font-style=italic% [[{*$FullName}?action=logout | $[Logout] ]]
(:else:)
* %item rel=nofollow class=login accesskey='$[ak_login]' font-style=italic% [[{*$FullName}?action=login | $[Login] ]]
(:ifend:)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment