Some links not working

6 posts by 2 authors in: Forums > CMS Builder
Last Post: November 17, 2009   (RSS)

Re: [Toledoh] Some links not working

By Dave - November 17, 2009

Hi Tim,

Can you attach the viewer file to this thread?

Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Some links not working

Here you go Dave.

Cheers,
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Some links not working

By Dave - November 17, 2009

I think it's loading the banner by number (9 or 4) instead of randomly which I think is what you want. Try removing these lines:

list($c_bannersRecords, $c_bannersMetaData) = getRecords(array(
'tableName' => 'c_banners',
'where' => whereRecordNumberInUrl(1),
'orderBy' => 'RAND()',
'limit' => '1',
));
$c_bannersRecord = @$c_bannersRecords[0]; // get first record

// show error message if no matching record is found
if (!$c_bannersRecord) {
print "Record not found!";
exit;
}


Let me know if that fixes it for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Some links not working

Hi Dave,

Works a treat - thanks!

That piece of code is loading a random header image, and it's on pretty much every page within the site... should I remove it from every page?

Cheers,
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] Some links not working

By Dave - November 17, 2009

Yes, otherwise it may have problems if there's a number in the url.
Dave Edis - Senior Developer
interactivetools.com