An add-on page is a pre-defined page element which can be plugged at any where within your page. The purpose of such page is to avoid code repetition in building web page. This in turn reduces human error in putting large code and makes editing easier. The only disadvantage is that, it takes little longer time to fetch the element from database.
If you want to use add-on page then you have to do the followings.
You can create a new add-on page by using 'create new' link or by editing an existing one and then saving it at a different name. Select a meaningful name; put the content at the content field and save the document - that's all.
You can insert add-on page elements within your web page. To insert add-on page at your web page content field or within head tag use the following command.
<addon>add-on_page_name</addon>
You can also dynamically add your addon page element. To do this use code
<dynamic> add-on_page_name</dynamic>
at the point where you want to insert it. The element will be loaded dynamically after loading your static document. The purposes of dynamical loading are,
If you want to add add-on page element at sidebar or page footer or any other places of your web page then you have to edit your template file associated with that web page. Within php tag just use the following command,
fw_db->get_addon('add-on_page_name');
where you want to add that element.
To add dynamically open the index.php file for editing. Use the following lines of code at the end of the file.
<script type="text/javascript">
<!--
fw_getaddon("<?php echo 'http://'.$_SERVER['HTTP_HOST'].fw_get_docroot().'fw_blog/admin/'; ?>"," add-on_page_name ","fw_left");
-->
</script>
Here are few recommended uses of add-on pages.