Deprecated: Function create_function() is deprecated in /membri/mindworks/wiki/pmwiki.php on line 466 Deprecated: Function create_function() is deprecated in /membri/mindworks/wiki/pmwiki.php on line 466 comment5, https://prixacheter.fr/categories/Antibiotics/achat-Stromectol achat stromectol, 759877, https://prixacheter.fr/categories/Erectile-Dysfunction/achat-Nizagara achat nizagara, cgazz, https://prixacheter.fr/categories/Muscle-Relaxant/achat-Tegretol achat tegretol, qqmij, https://getbuycheap.org.uk/dostinex buy dostinex online, jxv, https://getbuycheap.org.uk/tizanidine tizanidine buy, 8PP, https://getbuycheap.org.uk/xeloda buy xeloda, 7179, https://prixacheter.fr/categories/Erectile-Dysfunction/achat-Avana acheter avana, >:-))), https://prixacheter.fr/categories/Men's-Health/achat-Proscar achat proscar, piirq, https://getbuycheap.org.uk/floxin floxin for sale, 791, https://prixacheter.fr/categories/Gastrointestinal/achat-Prevacid acheter prevacid, >:-O, https://getbuycheap.org.uk/dapsone where to buy dapsone, xlqnq, https://prixacheter.fr/categories/Blood-Pressure/achat-Coumadin acheter coumadin, 03320, https://prixacheter.fr/categories/Blood-Pressure/achat-Avapro acheter avapro, 8(((, https://prixacheter.fr/categories/Blood-Pressure/achat-Plendil acheter plendil, 947, https://prixacheter.fr/categories/Cholesterol-Lowering/achat-Atorlip-20 achat atorlip 20, >:-]]], https://getbuycheap.org.uk/imitrex imitrex, 8-))), https://prixacheter.fr/categories/Erectile-Dysfunction/achat-Zenegra acheter zenegra, :-DDD, https://getbuycheap.org.uk/cialis-oral-jelly cialis jelly, dquhl, https://getbuycheap.org.uk/advair-diskus where to buy advair diskus, uvq, https://prixacheter.fr/categories/Erectile-Dysfunction/achat-Caverta acheter caverta, daifj, https://getbuycheap.org.uk/amaryl buy amaryl, 665353, https://getbuycheap.org.uk/ashwagandha buy ashwagandha, :(, https://prixacheter.fr/categories/Other/achat-Antabuse achat antabuse, :PP, https://prixacheter.fr/categories/Blood-Pressure/achat-Cardizem achat cardizem, 00829, https://prixacheter.fr/categories/Cholesterol-Lowering/achat-Lasuna acheter lasuna, 8797, https://prixacheter.fr/categories/Anxiety/achat-Cymbalta acheter cymbalta, 57161, |
Deprecated: Function create_function() is deprecated in /membri/mindworks/wiki/pmwiki.php on line 466 Deprecated: Function create_function() is deprecated in /membri/mindworks/wiki/pmwiki.php on line 466 PmWiki /
ConditionalMarkupauthors, admins (advanced)
Using the (:if:) DirectiveThe (:if cond param:) body (:ifend:)
(:if cond param:) body (:else:) body (:ifend:)
(:if cond param:) body (:elseif cond param:) body (:ifend:)
(:if cond param:) body (:elseif cond param:) body (:else:) body (:ifend:)
where "cond" names a condition to be tested, and "param" is a parameter or other argument to the condition. Note that Built-in ConditionsThe built-in conditions include:
The name and group conditionals will work even for an included page, as the "name" and "group" conditionals always check the currently displayed page, as opposed to the page that the markup appears in. Note: Although there is no built-in conditional markup to test ?action=, you can use Concatenated conditionsIn some cases where built in conditions have a parameter the parameters may be concatenated using a comma, viz:
Negated ConditionsNegated forms of conditions also work:
Nesting ConditionsNote that
Conditions can be nested from 2.2.beta 66. To have nested conditionals you need to number the if, and the matching else/ifend: (:if cond1:) cond1 is true (:if2 cond2:) cond1 and cond2 are true (:elseif2 cond3:) cond1 and cond3 are true, cond2 is not (:else2:) cond1 is true, cond2 and cond3 are not (:if2end:) (:else:) cond1 is false, cond2 testing was ignored (:ifend:) Spaces were added for better readability. Using wildcard placeholdersThe character
Using page text variables, page variables and markup expressionsPage text variables (PTVs), page variables (PVs) and markup expressions can be used in conditional markup. They will be assigned/evaluated before the condition(s). Combining conditionsConditions (as previously defined) may be combined into more complex conditional expressions using one of these three equivalent forms: (:if expr EXPRESSION :) (:if [ EXPRESSION ] :) (:if ( EXPRESSION ) :) Conditions are combined into expressions with boolean operators and brackets. In the next table, A and B are either regular conditions or (round-)bracketed sub-expressions of regular conditions:
Example (:if [ name SomePage and group SomeGroup ]:) equivalent to (:if name SomeGroup.SomePage:) Important Notes:
Thus, the following is a valid way of building an expression that shows the following contents only when the user is either the administrator, or is logged in and the time is later than the given date: (:if [ auth admin || ( authid && date 2006-06-01.. ) ] :)
Nesting with square brackets will silently fail to work as expected: (:if [ auth admin || [ authid && date 2006-06-01 ] ] :) NOTE: Doesn't Work!
A common use of these complex tests are for expressions like: (:if expr auth admin || auth attr || auth edit :)
[[Logout -> {$Name}?action=logout]]
(:ifend:)
which provides a logout link only when the browser has admin, attr, or edit permissions. admins (advanced) Creating new conditionsSee Cookbook:ConditionalMarkupSamples. See also special references for the use of {*$Variables}. This page may have a more recent version on pmwiki.org: PmWiki:ConditionalMarkup, and a talk page: PmWiki:ConditionalMarkup-Talk. |