User Tools

Site Tools


en:public:developer:template_system:tags:api:set_wwwfile_content

This is an old revision of the document!


<#set_wwwfile_content>

Use this function to set the content of a template file

Parameters

Name Mandatory Default Description
filename Yes The filename (related to the root). Ex: /templates/maintemplates/maintemplate.html
revertTo No Restore content of the file to the given revision
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

Example

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

will output in REST

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

And in JSON

  {"stat":"ok"}
en/public/developer/template_system/tags/api/set_wwwfile_content.1362766450.txt.gz · Last modified: 2013/03/08 22:14 by admin