User Tools

Site Tools


en:public:developer:template_system:tags:miscellaneous:content_type

<#content_type>

The Content_Type tag return the media type of the entity-body. you can override it via SetValue.

NOTE: if you want that the output response header contain the overriden content-type value instead of the default ”text/html; charset=utf-8” then you must add in the cfgpages a <content_type> node:

  <cfg>
    ..
    <content_type><#content_type></content_type>
  </cfg>

Note: the <#content_type> will never be initialized from the value set in the pageCfg node ! It's only initialized via the function call or the setValue parameter

Example

Before setValue: <#content_type>

<#content_type setValue="application/json">
After setValue: <#content_type>

Return

Before setValue: text/html; charset=utf-8

After setValue: application/json
en/public/developer/template_system/tags/miscellaneous/content_type.txt · Last modified: 2013/04/23 10:25 by svanderclock