|
Monday 29 May 2006 9:44:45 am
Comment45310
Hi, I tried to do what Lukasz Serwatka suggested in his last posting but I'm not successful. Here's what I did. In a siteaccess override for layout.ini I created this group:
[xml]
PageLayout=alb_xml_pagelayout.tpl
ContentType=text/xml
Of course I also created the template alb_xml_pagelayout.tpl which contains just some simple XML for test reasons. Then I added the Code that Lukasz suggested into kernel/layout/set.php. That you can see where I added it, I'm showing you the line before and after my insertion:
if ( $layoutINI->hasVariable( $LayoutStyle, 'PageLayout' ) )
$Result['pagelayout'] = $layoutINI->variable( $LayoutStyle, 'PageLayout' );
if ( $layoutINI->hasVariable( $LayoutStyle, 'ContentType' ) )
header( 'Content-Type: ' . $layoutINI->variable( $LayoutStyle, 'ContentType' ) . ' charset=' . $i18nINI->variable( 'CharacterSettings', 'Charset' ) );
include_once( 'kernel/common/eztemplatedesignresource.php' );
But now, when I'm viewing a node using this layout, I'm getting this error message:
"<b>Fatal error:</b> Call to a member function on a non-object in <b>/var/albwww/ez/kernel/layout/set.php</b> on line <b>57</b> <b>Fatal error:</b> Exponential did not finish its request The execution of Exponential was abruptly ended, the debug output is present below." I think that the usage of header() causes this problem, maybe it isn't allowed to use. But which function should I use instead? I tried to find information about setting headers etc. in this forum and the documentation, but didn't find anything. Can anybody help me?
|