AmphibiansReptiles
© 2002-2016 |
SitePageActionsauthors (basic) The Site.PageActions page is used as the source of the default wiki commands shown in the default PmWiki skin at the top right of the page. It displays as follows:
This page gives a brief explanation of how Site.PageActions are displayed and formatted, and pointers to where more information can be found. Below is what is shipped as Site.PageActions with PmWiki version 2.2: * %item rel=nofollow class=browse accesskey='$[ak_view]'% [[{*$FullName} | $[View] ]] * %item rel=nofollow class=edit accesskey='$[ak_edit]'% [[{*$FullName}?action=edit | $[Edit] ]] * %item rel=nofollow class=diff accesskey='$[ak_history]'% [[{*$FullName}?action=diff | $[History] ]] (:if auth upload:) * %item rel=nofollow class=upload accesskey='$[ak_attach]'% [[{*$FullName}?action=upload | $[Attach] ]] (:ifend:) * %item rel=nofollow class=print accesskey='$[ak_print]'% [[{*$FullName}?action=print | $[Print] ]] (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) * %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) (:if enabled AuthPw:) * %item rel=nofollow class=logout accesskey="$[ak_logout]"%'' [-[[{*$FullName}?action=logout | $[Logout] ]]-]'' (:ifend:) To start with, we'll look at just the first line, and take it apart. This will also give us a good handle on how most of the other lines work. ListEach line is an item in an unordered list, marked up by an unindented ' PmWiki will normally display an unordered list as a set of bulleted items, but they can appear differently depending on the context and styles they are displayed in. This difference in display is generally controlled by CSS defined in the Skin: for the PageActions links, the list items are displayed inline. StyleFollowing the ' In this case the WikiStyle starts with the word <li class='edit'>...</li>
instead of <li><span class='edit'>...</span></li>
Setting the class attribute of the list item allows CSS properties to be applied to the item that corresponds to the current action. For example, to have the current action display with a background color of blue, a wiki administrator can do:
= ' .{$Action} { background-color: blue; }';
Then if the current action is 'edit' (as in "?action=edit"), the list item corresponding to the edit action will be drawn with a blue background. The other property inside the AccesskeyAn accesskey can be defined in a number of locations, but essentially it is a phrase translation following the model used for internationalizations. PmWiki's accesskey defaults are defined in The You can most easily see this working in the other languages sections of PmWiki. For example, at PmWikiDe/PmWikiDe you'll notice that the default "View", "Edit", "History", and "Print" actions are displayed as "Artikel", "Bearbeiten", "Historie", and "Druckansicht". This is because the PmWikiDe group is loading in a set of translations from PmWikiDe.XLPage That page defines things like 'View' => 'Artikel' 'Edit' => 'Bearbeiten' 'History' => 'Historie' 'Print' => 'Druckansicht' which says that things like This makes it very easy for PmWiki to support multiple languages, since a recipe author can simply put any translatable prompts or phrases inside of LinkAll that leaves on the first line to be explained is the link itself: The link target section contains the IfThis explains what all of the ' Depending on the security and permissions model on a given site, its not unusual to see many more conditional markups that test if, for example, a user has editing rights to the current page. More information on all the different conditions can be found at the Conditional Markup page, and a general index of all the PmWiki documentation can be found at Documentation Index. Hopefully this bit of documentation has answered your questions about the Site.PageActions page. If not, you may wish to consult the helpful people on one of the PmWiki Mailing Lists. Hiding actionsIn a wiki page, In a SetTmplDisplay('PageActionFmt',0);
Group PageActionsNote that any Group can have a PageActions page, not just Site. If a page named This page may have a more recent version on pmwiki.org: PmWiki:SitePageActions, and a talk page: PmWiki:SitePageActions-Talk. |