The #HTTP_HEADER{argument}
tag is used to modify the HTTP header for the page generated by SPIP.
Remarks:
- #HTTP_HEADER
can not be preceded by any character or blank space.
- #HTTP_HEADER
must not be preceded by any other HTML code. Example:
|
_
not good! _ |
|
_
correct! _ |
- Using this tag deletes the administration buttons.
- This tag can not be used in template files included using the <INCLURE>
syntax.
Usage examples:
- #HTTP_HEADER{Content-Type: text/css}
is used to specify that the template (with the .html file extension) is in fact a stylesheet. For more information on this, refer to the article on SPIP-Contrib: Dynamic stylesheets - loops and tags in the CSS.
- #HTTP_HEADER{Content-Type: text/plain; charset=#CHARSET}
for the text version of an article.
- #HTTP_HEADER{Content-Type: text/csv; charset=#CHARSET}
#HTTP_HEADER{Content-Disposition: attachment; filename=rapport.csv}
for a template file that generates a CSV file.