Recent Changes - Search:

PmWiki

pmwiki.org

ConditionalMarkup-Talk

Markup Shortcut

You can also use an abbreviated form of (:ifend:), (:if:) for brevity:

(:if cond1:) cond1 is true (:if:)
(:if cond1:) cond1 is true (:if cond2:) cond2 is true (:if:)

The latter is identical to :

(:if cond1:) cond1 is true (:ifend:)(:if cond2:) cond2 is true (:ifend:)

Note that the use of(:if:) without parameters and (:ifend:) is identical.

How can I test if a file is being included? I want to omit part of the page if it is included.

If you mean how can you know if the page is being displayed normally versus via inclusion, you can test like this in the part of the page you wish to omit: (:if equal "{*$FullName}" "{$FullName}":) - when the part is being displayed on another page they won't be equal.

Where is the difference between round and square brackets in combined conditions?

?

Can specific attachments be tested for existence?

eg (:if attachments descriptor='*.jpg,*.jpeg':) see ConditionalMarkupSamples

Can attachments on a specific page be tested for existence?

eg (:if attachments Group.PageName:) ?

Can a numerical expression be tested for?

eg (:if {(strlen "{$:Summary}")} < 20:) ?

How can I achieve (:if link=Category/Something:)

?

Is it possible to test for (:if skin myskin:)

?

How do you specify the REGEX in the match expression? In testing if the page name ends in "-Talk", I've tried "-Talk$", /-Talk$/ and "/-Talk$/" and none of them seem to work. tamouse November 09, 2011, at 05:47 AM

It seems to work below:

(:if match -Talk$:)
This is a talk page.
(:else:)
This is not a talk page.
(:if:)

This is a talk page.

Obviously, for this exact conditional you have the easier and more robust name= parameter. --Petko November 09, 2011, at 04:37 PM

(:if name *-Talk:)
This is a talk page.
(:else:)
This is not a talk page.
(:if:)

This is a talk page.

is it possible to say (:if ! (EXPRESSION) :)?


This is a talk page for improving PmWiki.ConditionalMarkup.

Edit - History - Print - Recent Changes - Search
Page last modified on November 30, 2013, at 06:28 PM