|
|
@@ -925,9 +925,34 @@
|
|
|
the page title surrounded by parentheses if the page title is not empty).
|
|
|
You also can pass multiple values separated like with the function <code>%if-empty</code>.
|
|
|
</li>
|
|
|
+ <li><code>%if-equals<value|expected|trueValue|falseValue></code>: returns the
|
|
|
+ <code>trueValue</code> if <code>value</code> equals <code>expected</code> or the
|
|
|
+ <code>falseValue</code> otherwise (e.g.
|
|
|
+ "%if-equals<{page-title}|Untitled|{page-heading}|{page-title}>"
|
|
|
+ to return the page heading if the page title equals "Untitled" or the page title otherwise).
|
|
|
+ <li><code>%if-not-equals<value|expected|trueValue|falseValue></code>: returns the
|
|
|
+ <code>trueValue</code> if <code>value</code> does not equal <code>expected</code> or the
|
|
|
+ <code>falseValue</code> otherwise (e.g.
|
|
|
+ "%if-not-equals<{page-title}|Untitled|{page-title}|{page-heading}>"
|
|
|
+ to return the page heading if the page title does not equal "Untitled" or the page title
|
|
|
+ otherwise).
|
|
|
+ <li><code>%if-contains<value|expected|trueValue|falseValue></code>: returns the
|
|
|
+ <code>trueValue</code> if <code>value</code> contains <code>expected</code> or the
|
|
|
+ <code>falseValue</code> otherwise (e.g.
|
|
|
+ "%if-contains<{page-title}|Untitled|{page-heading}|{page-title}>"
|
|
|
+ to return the page heading if the page title contains "Untitled" or the page title otherwise).
|
|
|
+ </li>
|
|
|
+ <li><code>%if-not-contains<value|expected|trueValue|falseValue></code>: returns the
|
|
|
+ <code>trueValue</code> if <code>value</code> does not contain <code>expected</code> or the
|
|
|
+ <code>falseValue</code> otherwise (e.g.
|
|
|
+ "%if-not-contains<{page-title}|Untitled|{page-title}|{page-heading}>"
|
|
|
+ to return the page heading if the page title does not contain "Untitled" or the page title
|
|
|
+ otherwise).
|
|
|
+ </li>
|
|
|
<li><code>%substring<value|start|end></code>: returns a substring of the <code>value</code>
|
|
|
(e.g. "%substring<{page-title}|0|20>" to return the first 20 characters of the page
|
|
|
- title).
|
|
|
+ title, "%substring<{page-title}|5>" to return the page title without the first 5
|
|
|
+ characters).
|
|
|
</li>
|
|
|
<li><code>%lowercase<value></code>: returns the <code>value</code> in lowercase (e.g.
|
|
|
"%lowercase<{page-title}>" to return the page title in lowercase).
|
|
|
@@ -943,6 +968,21 @@
|
|
|
all <code>search</code> values replaced by <code>replacement</code> (e.g.
|
|
|
"%replace<{page-title}| |_>" to replace all spaces by underscores in the page title).
|
|
|
</li>
|
|
|
+ <li><code>%repeat<value|count></code>: returns the <code>value</code> repeated
|
|
|
+ <code>count</code> times (e.g. "%repeat<{page-title}|3>" to repeat the page title 3
|
|
|
+ times).
|
|
|
+ </li>
|
|
|
+ <li><code>%index-of<value|search></code>: returns the index of the first occurrence of
|
|
|
+ <code>search</code> in <code>value</code> (e.g. "%index-of<{page-title}|>" to return the
|
|
|
+ index of the first occurrence of the character ">" in the page title).
|
|
|
+ </li>
|
|
|
+ <li><code>%last-index-of<value|search></code>: returns the index of the last occurrence of
|
|
|
+ <code>search</code> in <code>value</code> (e.g. "%last-index-of<{page-title}|>" to return
|
|
|
+ the index of the last occurrence of the character ">" in the page title).
|
|
|
+ </li>
|
|
|
+ <li><code>%length<value></code>: returns the length of the <code>value</code> (e.g.
|
|
|
+ "%length<{page-title}>" to return the length of the page title).
|
|
|
+ </li>
|
|
|
<li><code>%trim<value></code>: returns the <code>value</code> with all leading and trailing
|
|
|
whitespace removed (e.g. "%trim<{page-title}>" to remove all leading and trailing
|
|
|
whitespace in the page title).
|
|
|
@@ -971,6 +1011,30 @@
|
|
|
<li><code>%url-search-value<index></code>: the value of the search parameter at the specified
|
|
|
index (e.g. "%url-search-value<0>" for the value of the first search parameter)
|
|
|
</li>
|
|
|
+ <li><code>%url-segment<index></code>: the segment of the pathname at the specified index (e.g.
|
|
|
+ "%url-segment<0>" for the first segment of the pathname)
|
|
|
+ </li>
|
|
|
+ <li><code>%url-hostname-subdomain<index></code>: the subdomain of the hostname at the
|
|
|
+ specified index (e.g. "%url-hostname-subdomain<0>" for the first subdomain of the
|
|
|
+ hostname)
|
|
|
+ </li>
|
|
|
+ <li><code>%stringify<value></code>: the string representation of the specified value (e.g.
|
|
|
+ "%stringify<{page-title}>" for the string representation of the page title)
|
|
|
+ </li>
|
|
|
+ <li><code>%encode-uri<value></code>: the URI-encoded representation of the specified value
|
|
|
+ (e.g. "%encode-uri<{page-title}>" for the URI-encoded representation of the page title)
|
|
|
+ </li>
|
|
|
+ <li><code>%decode-uri<value></code>: the URI-decoded representation of the specified value
|
|
|
+ (e.g. "%decode-uri<{page-title}>" for the URI-decoded representation of the page title)
|
|
|
+ </li>
|
|
|
+ <li><code>%encode-uri-component<value></code>: the URI-encoded representation of the
|
|
|
+ specified value (e.g. "%encode-uri-component<{page-title}>" for the URI-encoded
|
|
|
+ representation of the page title)
|
|
|
+ </li>
|
|
|
+ <li><code>%decode-uri-component<value></code>: the URI-decoded representation of the
|
|
|
+ specified value (e.g. "%decode-uri-component<{page-title}>" for the URI-decoded
|
|
|
+ representation of the page title)
|
|
|
+ </li>
|
|
|
<li><code>%page-element-text<selector></code>: the text content of the first element matching
|
|
|
the specified selector (e.g. "%page-element-text<h1>" for the text content of the first H1
|
|
|
element)
|