HELLLPPPPP!!!! Dynamic image header only display on the first article page

5 posts by 3 authors in: Forums > CMS Builder
Last Post: July 24, 2008   (RSS)

By willbegood - July 24, 2008

Hello, i really don't know where the bug is coming from.
I want to be able to change the main image of my header page (wich display on all of the page of my site).
So i create an editor (single record), with a "upload" field and a "text" field (i use it for the alt of my image).

I have many editors. When i put together my Header image and an editor (single menu) it works.
But when Header image is displayed with a detail page of another editor with multiple record... the header image only shows on the first entry date.
For exemple i have 3 articles, it will only show on the first article entered and never on the other.

Really strange!!! Do i forget something?
I know it's possible to make it work.
Please help!!!!!

Re: [willbegood] HELLLPPPPP!!!! Dynamic image header only display on the first article page

By willbegood - July 24, 2008

My top php code was:

list($imgheaderRecords, $imgheaderMetaData) = getRecords(array(
'tableName' => 'imgheader',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$imgheaderRecord = @$imgheaderRecords[0];

It works on lists

And for the the detail pages i've just commented the where and limit argument, and it works, see below:

list($imgheaderRecords, $imgheaderMetaData) = getRecords(array(
'tableName' => 'imgheader',
//'where' => whereRecordNumberInUrl(1),
//'limit' => '1',
));
$imgheaderRecord = @$imgheaderRecords[0];

Does somebody can tell me if it's a "correct" way to do it, perhaps there is a more elegant way ;).
And i would like to understand the all stuff please.

Re: [sagentic] HELLLPPPPP!!!! Dynamic image header only display on the first article page

By willbegood - July 24, 2008

A already tryed to do that, it doesn't worked

Re: [willbegood] HELLLPPPPP!!!! Dynamic image header only display on the first article page

By Dave - July 24, 2008

Hi willbegood,

Sometimes when you have multiple viewers you need to make sure they use different variable names or they'll overwrite each others values. It could be that, or it could be something else.

Are you able to post an url where we can see the problem and attach the problem viewer to this thread? If I can look at the code it will help.

Thanks!
Dave Edis - Senior Developer
interactivetools.com