Author Topic

Łukasz Serwatka

Thursday 09 February 2006 6:03:37 am

Comment45309

Hi Stig,

You are right, that's why you should make it INI configuration base. ContentType per view. If you have e.g view xml then use xml contentype if print then use standard http. You will need to implement some logic.

Example can look like:

if ( $layoutINI->hasVariable( $LayoutStyle, 'ContentType' )  )
		header( 'Content-Type: ' . $layoutINI->variable( $LayoutStyle, 'ContentType' ) . ' charset=' . $i18nINI->variable( 'CharacterSettings', 'Charset' ) );

It is basically one more variable ContentType where you define it. This can be use full for alternative e.g for RSS.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog