Page
From ThrottleWiki
A setup can consist of multiple pages, contained in the config.xml file, of which one is active at any given time. The content in the active page defines what is shown, either full screen in the standalone app or in the part of the today screen that TL occupies (With the exception of the footer which is also defined on root level but which is displayed on the bottom of each page).
Pages can be activated through any icon or text element (but typically icons in the footer) by setting the exec attribute to ":Page" with params="pageName" (case sensitive!). On startup, the first page in the config file is activated.
A page can contain one or more <row> elements, one or more today plugins (<plugin> elements) , or shockwave flash objects (<throttleplugin> element). There are two different tags due to the inherent diferences between generic today plugins and Throttle specific designed plugins.
A page element can have the following attributes:
- name: contains the name of the page. This is going to be used when whe create a link to this page.- autounloadtime: time an unused page will remain loaded until autounload event starts. This param must be only used it autounload is true.
- loadonstartup="true" causes the page content to be loaded on startup of throttle instead of when the page is activated. This causes the page to appear quicker when it is activated because it is already loaded, at the cost of more memory useage.
- autounload="true" causes the page content to be unloaded when another page is activated. This allows to free up memory, but it will take more time to activate the page the next time because it has to be loaded again.
The content of the page can be defined directly in the config.xml file
Example:
<page name="Home" loadonstartup="false" autounload="true> <row> ... </row> </page>
- Alternatively, the import attribute allows to define the page content in a separate xml file rather than in the config file itself. The separate file should contain the <page> tag as root element, without any attributes.
Example:
<page name="home" loadonstartup="true" import=home.xml />
where home.xml is located in the setup folder, and contains:
<?xml version=1.0 encoding="utf-8"?> <page> <row> ... </row> </page>