User Tools

Site Tools


Sidebar

startup_tutorial_and_checklist:design_configuration:placing_module_addon_tags:start

Placing Modules/Addon Tags in Your Design

One of the powerful features of our software's design tools is that you can place specific functionality through out your design through the placement of modules and addons throughout. If you look at the default design you can see several modules at work. They were all placed there in the design using a module or addon tag. The rest of this page goes through the ways to place those tags.

Module Tags

As you browse the functionality available to you in the PAGE MODULES admin tool you will notice within the modules admin tool the module name and immediately below that name a tag that looks something like:

{module tag='this_module_1'}

The tag immediately below the modules name is the module placement tag. This tag is used within the html of your templates to place the functionality of that module within your design. Every module that is placed within a template is built on the fly at the time a visitor to your site "requests" that page through their browser. The module placement tag tells the script where you wish to place that modules functionality in your design.

Addon Tags

Only some addons have functionality you actually place within your design. For those that do place their functionality where you wish it in the design are addon placement tags listed within their admin tool. Below is the addon placement tag example that comes from the Geographic Navigation addon:

{addon author='geo_addons' addon='geographic_navigation' tag='navigation'}

Placing that tag within the design templates put the specific functionality from that addon in that place within the design.

Placing A Tag In Your Design

To actually place module/addon functionality in your site require two things…one of which will occur automatically for you.

1) Place the module/addon placement tag in your design

This requires that you find the html in the template design where you want that modules/addons output to appear within the html of that page. Note that you may need to change the html surrounding where you want to place the module/addon functionality. All module/addon functionality does have it's own html to format it's output and much of the time that html is created so that it will expand to fit the "html space" you put it in. So you may need to make changes in the html surrounding where you put a module to properly format that module within your design. Once you have found the place you wish to put that module/addon paste that placement tag (described above) into the html source in that exact place you want it to appear you paste that modules tag in that place of the html.

You can cut and paste the module/addon placement tag from the PAGE MODULES section of the admin tool directly into your template but you can also use the "Insert Tag" feature of the DESIGN > MANAGER admin tool to insert the proper tag for you. That feature is explained in the special tools section of the wiki.

2) Attach the module/addon to the page it should appear in

This step happens for you automatically in most cases. If you make your changes through the DESIGN > MANAGER admin tool every time you save a page template the system automatically scans that page to see if any modules are referenced within it. The system notes all module/addon tags found within a template so that it knows to run that modules/addons functionality when a page that template is attached to is requested by a client on the client side.

But note that if you do NOT make your changes to a template within the DESIGN > MANAGER admin tool the system does not know whether you have made changes to a template file and so does not know to automatically scan a template for possible new module, addon and template inclusions. We have created the Re-Scan Attachments feature found in the DESIGN > TEMPLATE SETS admin tool to force the system to scan for changes in the template set that affect the inclusion of modules, addons and sub-templates in other templates. That feature is also explained here in the support wiki.

Template Directories That Are Scanned

Note that only the templates within the /main_page directory of your working template set are scanned for module and addon placement tags. If you place one of these tags in a template outside of this template set the system cannot automatically call that modules/addons functionality to include it in that page. We suggest you try to only place module/addon placement tags within a template within the /main_page template directory. This would make template management much easier in the long and short run if it's possible. If you can't make this happen you would need to put the module/addon placement tag within an html commented out section of the page template used on the page in question thus allowing the system to "attach" that module's functionality to that page.

Testing To See What A Tag Outputs

You can only test to see what a tag outputs by placing it within a page in the system. You can guess at it's output by looking within the templates for that addon or module but the best way is to see it in action on a page within the system. Our first suggestion is to use it within a testing installation of our software if you have one but if not and you don't want to disturb your live installation you could use one of the unused extra pages in the system for that. Note though that some modules and addons display differently depending on where they are used within the system so in some instances the final arbiter of how a module/addon tags displays within your design where you want is to place it there. In any instance we would always suggest that you surround you module/addon placement tag with html comments so you can see exactly what the addon tag displays. Look to the following as an example:

<!--THE FOLLOWING HTML IS THE OUTPUT OF THE NEWEST/ENDING SOONEST MODULE-->
{module tag='newest_ads_1'}
<!--THE PREVIOUS HTML IS THE OUTPUT OF THE NEWEST/ENDING SOONEST MODULE-->

<!--THE FOLLOWING HTML IS THE OUTPUT OF THE GEOGRAPHIC NAVIGATION ADDON-->
{addon author='geo_addons' addon='geographic_navigation' tag='navigation'}
<!--THE PREVIOUS HTML IS THE OUTPUT OF THE GEOGRAPHIC NAVIGATION ADDON-->
startup_tutorial_and_checklist/design_configuration/placing_module_addon_tags/start.txt · Last modified: 2014/09/25 16:55 (external edit)