Help And Documentation

2: Object Reference

2.4: The Site Object

The Site Object is always the first object of an application to which all other normal content and processes are added.

By default, the <html>, <head> and <body> HTML tags are automatically generated for you so that you can immediately add all of the site's content, but you can turn this off if you want to generate the entirety of your HTML.

The Site Object is also responsible for extra routing logic and running any processes which are added to the site.


Add Content

This method can be used multiple times.

This method can be used to add content to the site. By default, the <html>, <head> and <body> HTML tags are automatically generated for you so that you can immediately add all of the site's content here. This also allows you to more easily use any uploaded CSS and JavaScript files as well as manage the current page title and meta tags when using Page objects anywhere else in the site.

Any objects that are added using this method are guaranteed to be executed every time the site is visited.

Parameters

Name Text Variable Object Array Description
Content Yes Yes Yes No HTML content that is to be sent to the web browser.

Add Process

This method can be used multiple times.

This method will add a process which will execute all its objects at a set time interval in minutes if the site is published. You may also reuse the same Process objects several times while supplying different URL Values which can be used by Page objects or turned into data variables to perform different actions as needed.

A process will not run again until the previous instance of it being executed has finished running.

Parameters

Name Text Variable Object Array Description
Process No No Yes No Any Process object.
URL Value Yes No No No Optional: Text values seperated by forward slash characters ('/') which are turned into url segments to be used by the Process object to set variables or by used by Page objects.
Interval Yes No No No How frequently the process will be run in minutes specified as a whole number only.

Set Site Attributes

This method can only be used once.

This method can be used to set the favicon icon of the site and its initial title, description and keywords.

Parameters

Name Text Variable Object Array
Favicon Yes No No No
Title Yes No No No
Description Yes No No No
Keywords Yes No No No

Add CSS File

This method can be used multiple times.

This method will include a CSS asset file that you have already uploaded and link to it in the HTML header of the site. The file will be included across the entire site, unlike the same method you can use inside of a Page Object.

Parameters

Name Text Variable Object Array
File Yes No No No

Add Javascript File

This method can be used multiple times.

This method will include a JavaScript asset file that you have already uploaded and link to it in the HTML header of the site. The file will be included across the entire site, unlike the same method you can use inside of a Page Object.

Parameters

Name Text Variable Object Array
File Yes No No No

Don't Generate HTML Tags

This method can only be used once.

This method tells the Site object not to generate the <html>, <head> and <body> HTML tags. You will have to add the entirety of the HTML of your site and link to any uploaded assets using the Add Content method manually.

Parameters

This method doesn't contain any parameters.


Set 404 Content

This method can be used multiple times.

This method allows you to add content that will be shown if the Site object doesn't find any page objects that return their own content. This means that it is possible for a Page object to match the correct URL but still trigger this 404 content if it doesn't return any of its own content.

Parameters

Name Text Variable Object Array
Content Yes Yes Yes No

Add Redirect

This method can be used multiple times.

This method allows universal rules to be set up to redirect a web request based on the start of the URL. It will search for the 'From' value at the beginning of the URL and if found redirect to the URL in the 'To' value without modifying it or appending any other value.

Parameters

Name Text Variable Object Array
From Yes No Yes No
To Yes No Yes No

Add Rewrite

This method can be used multiple times.

This method allows universal rules to be set up to change a URL before it reaches any site objects based on the start of the original URL. It will search for the 'From' value at the beginning of the URL and if found replace it with the 'To' value while keeping any other text that might have been there after the initial 'From' value.

Parameters

Name Text Variable Object Array
From Yes No Yes No
To Yes No Yes No

Next Page » « Previous Page