| ||||||||||||||||||||||||||||||||||
Navigation Home Page
Click here to expand or collapse... Every You, Every Me (Youtube release)
Upcoming BL Series (Start date) Click here to expand or collapse... Top Form (Thu 20 Mar 2025)
Click here to expand or collapse... Art Of Love (OFFLINE)
Beautiful Scars (Episode 4 finale OFFLINE)
Boyband (No International release)
Friend Forever/Our Love Is Sick (OFFLINE)
Great Men Academy (OFFLINE)
Healing Thingyan (OFFLINE)
Hehe & He (Season 3 - on hiatus)
Hook Up (Season 2) (OFFLINE)
If I Love A Boy (OFFLINE)
Indigo (OFFLINE)
Jack And Jill (OFFLINE)
Lakan (OFFLINE)
Make A Wish [Philippines] (OFFLINE)
Make A Wish [Thailand] (No International release)
Missing Piece (OFFLINE)
My Secret Love (OFFLINE)
Quaranthings (OFFLINE)
Roommate (Season 1 OFFLINE)
Sugar Dog Life (No International release)
Truly Very Yours (Season 1) (OFFLINE)
Unguarded (Season 3) (OFFLINE)
Venus In The Sky (Youtube release)
Click here to expand or collapse...Click here to expand or collapse... Destined/Fated (OFFLINE)
Infinity (OFFLINE)
Kiss The Night (OFFLINE)
Overlooked Love (OFFLINE)
The Next Door Crush (OFFLINE)
The Whisperer (EP10 Finale never released)
Unexpected (OFFLINE)
Click here to expand or collapse... = Cambodia = China = Hong Kong = India |
ConditionalMarkupauthors, admins (advanced) The Using the (:if:) DirectiveThe generic forms of the
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:
In the following "if date" examples:
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. 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:
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:
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
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:
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 This page may have a more recent version on pmwiki.org: PmWiki:ConditionalMarkup, and a talk page: PmWiki:ConditionalMarkup-Talk. | |||||||||||||||||||||||||||||||||
View
Edit
History
Attach
Print
Page last modified on April 28, 2024, at 02:20 AM |