Add-on page and its uses

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.

  1. Create an add-on page.
  2. Add that page with your web page.

Create an add-on page

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.

How to add

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,

  1. Main document loaded faster.
  2. Search engine spider can't find this element in your page.

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.

Code | Download
<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>

Recommended uses of add-on pages

Here are few recommended uses of add-on pages.

  • Adding adsense code: Create an add-on page and put your adsense code in it. Now wherever you require you put the following line of code to integrate adsense within your page content.
    <addon>add-on_page_name</addon>
  • Adding large script or style: As the field 'Other head tags' of a page or post is limited to 3000 characters you are still be able to add longer page element such as long JavaScript code or local style within your head tag by using add-on page. Just create an add-on page; put your long content and include it at the field 'Other had tags' as shown in above example.
  • Adding custom menu: Although ramui webblog script includes two different types of menu generator you can still use your customs menu for a single page or even for the entire website. Detail description is given here.

RAMUI WEBBLOG
HomeAboutContact SitemapTerms of useXMLForum
© 2010,  http://ramui.com   All rights reserved.
Powered by: ramui webblog® Version 1.0