Lack of interest Search bar - add variable to disable elements

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

cclaerhout

Well-known member
It would be convenient to wrap some elements of the search bar between conditionals to enable/disable them.
Demo:
TMC.webp
Template mod:
Template: search_bar
Search:
Code:
#([ \t]+)(<dl[^>]+>[\s]+<dt>.*searchBar_users[\s\S]+?</dl>)[\s]+?(<dl[^>]+>[\s]+<dt>.*searchBar_date[\s\S]+?</dl>)#i
Replace:
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:
result.webp
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Back
Top Bottom