3. Site XML - Glidias/Kilogaiajax GitHub Wiki
Please refer to the basic overview under "Getting Started" section if you haven't already. This section documents everything else (the various attributes that Kilogaiajax uses) for every node type in your Site XML Model.
<site>
-
title
- Required. The page title format to display eg.<site title="Site Title - %PAGE%">
-
gaAccount
- Optional. Supports automatic Google analytics page tracking when visiting any valid pages declared within Site XML. Just put your GA account ID accordingly. eg.<site title="Site Title - %PAGE%" gaAccount="UA-242811482-1">
<page>
-
title
- Optional. The Page title. If left undefined, I think it uses something like "Untitled". -
id
- Required. The branch id. This is used to form full hashbanged SWFAddress routes for HTML4-based browsers. Every valid page node leaf under a parent page must contain a unique id. -
src
- Required for valid pages. The URL to use for retrieving HTML contents. -
query
- You should set this attribute value to "1" if the user's URL request could potentially contain a "?" query string.
Valid pages (ie. terminal leaf page nodes) refer to pages that are viewable and have html content associated with it. These are page nodes without any child page nodes. Accompanying page-specific assets should be declared in leaf nodes only. Any globally available assets can be loaded via HTML header, or placed in the Site XML's root page node to be preloaded, but should NOT exist under any leaf page.
<asset>
-
src
- Required. The URL to retrieve the asset's contents. -
type
- Optional. By default, the framework automatically determines the asset type based on the src URL's file extension. However, if the file extension isn't available, you can manually declare the file extension accordingly. (eg.<asset src="http://www.somesitecdn.com/?file=awrwa" type="js"
) -
id
- Optional. Allows you to easily identify the asset by a unique "id" under the page, otherwise, the "src" attribute is used as the id. -
query
- You should set this attribute value to "1" if the asset's src url request contains a "?" query string.
Asset nodes refer to assets that must be preloaded prior to executing page code. Currently, the framework support the following asset types:
-
json
- JSONAsset. An object with a.getData()
method to retrieve JSON data..json
-
css
- CSS stylesheets to alter the appearance of the site. Once load completes, the stylesheet is added to DOM..css
-
js
- Javascript files to preload and initialize. Once load completes, the javascript executes immediately..js
-
image
- ImageAsset. Images that are preloaded are cached permanently per site session in a hidden DOM div..png
.jpg
.gif