Display "No Records Found" Message

6 posts by 2 authors in: Forums > CMS Builder
Last Post: April 8, 2008   (RSS)

By kcallana - March 31, 2008

I want to have a photo pop into the spot if there is nothing filled in on cms fields, is this possible? Right now it doesn't even come up with the "No records Foun", what have I done wrong? Here is the page http://www.lorenzos.net it is the Holiday Specials Section in the lower right.



Thanks!

Re: [kcallana] Display "No Records Found" Message

By Dave - March 31, 2008

No problem, just put your image tag where the "no records found" text is. The code should look like this:

<?php if ($listDetails['noRecordsFound']): ?>
No records were found!<br/>
(but replace this with your image tag!)
<?php endif ?>


If that's not working attach your viewer file and I can look at the code for you.

Hope that helps! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Display "No Records Found" Message

By kcallana - April 6, 2008

my code is

<?php endif ?>
<?php if (empty($record)): ?>
<!-- Display "No Records Found" Message -->
<img src="/images/holiday.png">
<?php endif ?>



not<?php if ($listDetails['noRecordsFound']): ?>
No records were found!<br/>
(but replace this with your image tag!)
<?php endif ?>



the page is www.lorenzos.net/index.php

Re: [kcallana] Display "No Records Found" Message

By Dave - April 6, 2008

Is Holiday Specials a single record or a list of pages? If it's a list of pages you may want to use the list viewer code.

If you could attach the file for index.php I could look at the viewer code and try and spot the problem.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Display "No Records Found" Message

By kcallana - April 7, 2008

holiday specials is a single page.

index.php is attached

thanks!
Attachments:

index_001.php 20K