#HTTP_HEADER

  • New in : SPIP 1.9

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:

  
  <BOUCLE_truc(ARTICLES)>        
  <!-- start of the page -->
  #HTTP_HEADER{...}                  
  ...
  
_

not good!

_

  <BOUCLE_truc(ARTICLES)>        
  #HTTP_HEADER{...}                  
  <!-- start of the page -->
  ...
_

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.

Author Mark Published : Updated : 20/04/23

Translations : català, English, Español, français, Nederlands