cclaerhout
Well-known member
It would be convenient to wrap some elements of the search bar between conditionals to enable/disable them.
Demo:
Template mod:
Demo:
Template mod:
Template: search_bar
Search:
Replace:
To use in template:
Possible result:
Search:
Code:
#([ \t]+)(<dl[^>]+>[\s]+<dt>.*searchBar_users[\s\S]+?</dl>)[\s]+?(<dl[^>]+>[\s]+<dt>.*searchBar_date[\s\S]+?</dl>)#i
Code:
$1<xen:if is="!{$disableSearchBar.byUser}">
$1$2
$1</xen:if>
$1<xen:if is="!{$disableSearchBar.byDate}">
$1$3
$1</xen:if>
To use in template:
HTML:
<xen:container var="$disableSearchBar.byDate">1</xen:container>
<xen:container var="$disableSearchBar.byUser">1</xen:container>
Possible result:
Upvote
0