Hide if search results

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 2, 2018   (RSS)

By Toledoh - February 2, 2018

Hi All.

I have a home page with a div, then a list of items.  I'm using the standard search form to filter those items. ie

<form class="form-inline my-2 my-lg-0 mr-auto" method="POST" action="<?php echo PREFIX_URL ?>/index.php">
<input class="form-control" type="search" name="name,description,tags_keyword" placeholder="Search" value="">
<button class="btn btn-outline-info my-2 my-sm-0" type="submit">Search</button>
</form>

Is there any way to hide the div if that page is being viewed as the results of a search?

ie

<?php if (@$SEARCH): ?>
<div>This is the div that I want to hide</div>
<?php endif ?>
<ul>
<li>Item</li>
<li>Item</li>
<li>Item</li>
</ul>

Thanks

Cheers,

Tim (toledoh.com.au)

By Toledoh - February 2, 2018

Perfect! 

Thanks

Cheers,

Tim (toledoh.com.au)