Record Not Found on some pages

7 posts by 5 authors in: Forums > CMS Builder
Last Post: March 3, 2009   (RSS)

By Izadorra - March 1, 2009

My client wanted me to post an area at the bottom of each page that contains her copyright in a way that she can edit it each year. I put the code for a single page copyright record at the bottom of each of her pages. The first page of each shows the copyright but subsequent pages say "No Record Found" but it's only 1 record.

http://nancycarleton.com/praiseList.php?page=1 Copyright shows up fine

http://nancycarleton.com/praiseList.php?page=2
and after "No Record Found"

<?php

require_once "/hermes/web01/b2486/pow.nancycarleton/htdocs/cmsAdmin/lib/viewer_functions.php";

list($copyrightRecords, $copyrightMetaData) = getRecords(array(
'tableName' => 'copyright',
'where' => whereRecordNumberInUrl(1),
'loadUploads' => '0',
'limit' => '1',
'allowSearch' => 'false',
));
$copyrightRecord = @$copyrightRecords[0]; // get first record

?>

<?php echo $copyrightRecord['content'] ?><br/>

<?php if (!$copyrightRecord): ?>
No record found!<br/><br/>
<?php endif ?>

Re: [Izadorra] Record Not Found on some pages

By Kenny - March 2, 2009 - edited: March 2, 2009

Try removing 'allowSearch' => 'false', or setting it to true

Let me know if that works.


Kenny

Re: [Izadorra] Record Not Found on some pages

By rebjr - March 2, 2009

I'm not sure what all your client wants to edit, but if it's just the year then why not just have it update automatically using PHP with something like this:

<p>Copyright &copy; <?php echo(date("Y")); ?> Nancy Carleton. All rights reserved.</p>

Re: [Izadorra] Record Not Found on some pages

By ross - March 2, 2009

Hi there.

I am thinking that rebjr suggestion might actually be the easiest to use as you it will keep the copyright up to date automatically.

If you wanted to have it so you can change it in CMS Builder yourself, we'll have to go over the code on your page in more detail. I suspect that you already have another bit of viewer code on all these pages and we'll need to adjust the one a bit specifically for the copyright message.

Let me know what you think and we'll go from there.

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [rebjr] Record Not Found on some pages

By Izadorra - March 3, 2009

Geez, this would have been much easier. The client requested the ability to edit this herself but using this eliminates the need to. [crazy]

Re: [Dave] Record Not Found on some pages

By Izadorra - March 3, 2009

This worked perfectly. Thank you! [:)]