Re: [Dave] Generating XML using CMS
Interstingly if I change the links to be absolute (by adding the http:// + url in the section editor that creates the XML) then in Flash, when I publish the file, it works locally. But again, when I upload it, it does not work. That tells me that the actual XML is correct, but its delivery is not.
I then found one thing which may be an issue in the logs in Safari when it loads the page -
http://esvc000159.wic032u.server-web.com/slideshow.php?noCache=1229302787177
Not sure why it is adding this code to the end of slideshow.php, but when I follow that URL, it states:
Warning: Invalid argument supplied for foreach() in e:\inetpub\esvc000159\slideshow.php on line 15.
Here is my code again in slideshow.php:
<?php header('Content-type: application/xml; charset=utf-8'); ?>
<?php
require_once "e:/inetpub/esvc000159/cmsAdmin/lib/viewer_functions.php";
list($home_pageRecords, $home_pageMetaData) = getRecords(array(
'tableName' => 'home_page',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$home_pageRecord = @$home_pageRecords[0]; // get first record
?>
<slideshow randomDisplay='false'>
<?php foreach ($home_pageRecord['banner'] as $upload): ?>
<image src='http://esvc000159.wic032u.server-web.com<?php echo $upload['urlPath'] ?>' link='<?php echo $upload['info1'] ?>' inEffect='Fade in' outEffect='Fade out'>
<caption>No caption</caption>
</image>
<?php endforeach ?>
</slideshow>
Does this shed any light on the matter?