Kviečiu išmąstyti ir puoselėti bendrystę ugdytis, bręsti, gyventi amžinai jau čia ir dabar. Pavaizdavimai? E6E6FF Asmeniškai? BA9696 Darbai FFFFC0 Išsiaiškinimai D8F1D8 Užrašai EEEEEE Kitų mintys? ECD9EC Dievas man? FFECC0 Mieli dalyviai! Visa mano kūryba ir kartu visi šie puslapiai yra visuomenės turtas, kuriuo visi kviečiami laisvai naudotis, dalintis, visaip perkurti. - Andrius |
authors (basic) The Site.PageActions uses a large number of PmWiki features in concert. This page gives a brief explanation of the features commonly used on Site.PageActions, and pointers to where more information can be found. To start with, lets look at a typical Site.PageActions page. * %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:) (: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:) That can seem a bit daunting, but we'll take it piece by piece. 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. ListThe first line, and in fact every line, begins with an unindented ' If you take a look at the Site.PageActions page with the default PmWiki skin, you'll see that the list appears twice, once as a normal bulleted list in the middle of the page, and once as a row of unbulleted actions at the top right corner of the page. This is controlled by the fact that they are being rendered inside an HTML You can see the difference for yourself since PmWiki has markup that lets you ask for something to be rendered inside a div with a given
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. Note that any Group can have a Page Actions? page, not just Site - this page should be edited to reflect that.
This page may have a more recent version on pmwiki.org: PmWiki:SitePageActions, and a talk page: PmWiki:SitePageActions-Talk. |
SitePageActionsNaujausi pakeitimai |
Puslapis paskutinį kartą pakeistas 2009 sausio 30 d., 18:12
|