Strange Blog Results... Help^^

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

By avrom - December 25, 2008 - edited: December 25, 2008

Hi Dave, Merry X-Mas to you and your family :)) Since I'm snowed in today I'm working on a client site...

I'm having some strange problems with a blog.php page that displays an individual blog article. I really can't find the cause of this.

Here is the main site template, it is made up of several include files, each with their own viewers:
http://www.passionville.net/main.php


Here is an example where the blog display is working correctly:
http://www.passionville.net/blog.php?Brazil-s-Martini-s-Grill-1

If I click on any other of the blog links from the main template you can see the whole site template starts to fall apart:
http://www.passionville.net/blog.php?What-Is-Happening-In-Tibet-Now-4
http://www.passionville.net/blog.php?Beijing-Olympics---At-What-Costs-3

One page displays an error warning for the ads_250x80 file which is correct syntax but the other page doesnot. I n fact the content missing is specifically from 2 include files: bot_panel.php and left_panel.php

Sorry Dave but I will really need your help on this one ;))

Cheers
Avrom

Re: [virgodesign] Strange Blog Results... Help^^

By Dave - December 27, 2008

Hi Avrom,

My first guess is that you have multiple viewers on the page and they're all trying to load their record numbers from the url with this line:

'where' => whereRecordNumberInUrl(1),

If you want your ads to load regardless of record number just remove that line from the getRecords() code. Or... Replace it with a where that isn't based on the number in the url.

Otherwise, if that doesn't fix it feel free to email me CMS and FTP login details to dave@interactivetools.com and I can take a look (email, don't post login details to the forum).

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

Re: [Dave] Strange Blog Results... Help^^

By avrom - December 30, 2008

Yes Dave, that was exactly it...

Many Thanks :)))

Re: [virgodesign] Strange Blog Results... Help^^

By Dave - December 31, 2008

Hi Avrom,

You can put an "if" around the foreach so it doesn't run if there are no ads:

<?php if ($ads_380x200Record['ad_upload']): ?>
<?php foreach ($ads_380x200Record['ad_upload'] as $upload): ?>
...
<?php endforeach ?>
<?php endif ?>


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

Re: [Dave] Strange Blog Results... Help^^

By avrom - December 31, 2008

Thanks Dave, perect !!