class HeadlessController extends Headless (View source)

The headless controller.

Methods

static string
getTemplate()

Checks whether a custom headless template exists and returns its path.

from Headless
static Response
editTemplate()

Save the updated template or render the editor in case no template was posted.

static string
loadTemplate()

Get the content of the template in use.

static Response
resetTemplate()

Reset the headless template by deleting the custom template file.

Details

static string getTemplate()

Checks whether a custom headless template exists and returns its path.

In case there is no custom template, the path to the default template is returned.

Return Value

string The path to the template file

static Response editTemplate()

Save the updated template or render the editor in case no template was posted.

Return Value

Response the response object

static string loadTemplate()

Get the content of the template in use.

Return Value

string The content of the template in use

static Response resetTemplate()

Reset the headless template by deleting the custom template file.

Return Value

Response the response object