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: [willbegood] HELLLPPPPP!!!! Dynamic image header only display on the first article page

By Kenny - July 24, 2008

Try creating a page that just shows your header image.

Then on all other pages, put a php includes statement where the header would be:

<?php include "header.php"; ?>

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