You are here:  » noresults.php has a variable??

Support Forum



noresults.php has a variable??

Submitted by paul30 on Sat, 2008-09-27 16:28 in

Hello david I am wondering if noresults.php has a variable or anything the like?

I am using a different footer on my front page (compared to the rest of the site) - I am triggering it from the footer.php via $_SERVER["REQUEST_URI"] :

if ($_SERVER["REQUEST_URI"] == '/') echo... else echo

I want to match the index.php page with "no results found" page - Is it possible to make something similar for the noresults.php? Like "if noresults.php loaded echo ... else echo..." in the footer.php?

Thanks a lot
Pasha

Submitted by support on Sat, 2008-09-27 19:09

Hello Pasha,

Sure - this should just be a case of setting a variable within html/noresults.php, and then checking for it in your custom footer. To do this, simply add the following code into html/noresults.php:

<?php
  $noresults 
TRUE;
?>

...and then in your footer, just use the following code:

  if ($noresults)
  {
    echo "No Result message";
  }
  else
  {
    echo "Normal message";
  }

Cheers,
David.

Submitted by paul30 on Sun, 2008-09-28 01:58

David, - Thank you very much! - Works perfectly!