User Tools

Site Tools


en:public:developer:template_system:tags:api:get_wwwfile_content

<#get_wwwfile_content>

Use this function to retrieve the content of a template file

Parameters

Parameters are taken from tag (default) or from HTTP GET/Post

Name Mandatory Default Description
filename Yes The filename (related to the root). Ex: /templates/maintemplates/maintemplate.html
revision No Determines in with revision number the content is first looked up
output_format No REST JSON to retrieve response in JSON Format or REST to retrieve in REST Format
jsoncallback No Callback function to use in JSON Response Format

Error Codes

Code Description
1 Insufficient rights. You must be logged as an admin to see logs
114 File not found
119 Wrong Params

Example

<#get_wwwfile_content filename="/templates/maintemplates/maintemplate.html">

will output in REST

 <rsp stat="ok">
   <content>
     ...
   </content>
 </rsp>

And in JSON

  {
   "stat":"ok",
   "content":"..."  
  }
en/public/developer/template_system/tags/api/get_wwwfile_content.txt · Last modified: 2013/05/21 12:33 by svanderclock