Loads content between webstore templates


Setting the content to store:

[%site_value id:'your_id'%]
    Content goes here

Loading stored content:

[%site_value id:'your_id' type:'load' /%]

Standard footer_javascript used in most themes:

Product template:

[%site_value id:'footer_javascript'%]
    <script type="text/javascript" language="javascript">
        $(document).ready(function() {
                'loadtmplates': ['_buying_options', '_images','_header'],
                'fns' : {
                    'onLoad' : function () {
                    'onReady' : function () {
                            date: "[%format type:'date' format:'#K #d, #Y  #H:#I'%][@promo_end@][%/format%]"
            [%if [@has_components@]%]

Footer template:

[%site_value id:'footer_javascript' type:'load' /%]


The site value tag first selects a block of content to load which can include all sorts of HTML & B@SE tags, but then loads them in a separate part of the site and includes support for separate templates.

An example of this is within our core template is using it to load any Javascript that occurs in the body and relies on body specific data tags to be moved to the footer to assist page load.

When using the site_value tag there are 3 things to remember about it's use:

  1. The site value can only be loaded underneath the data that is collected in the code on the page.
  2. When loading setting and loading data, keyhole caching will break the results.
  3. The site value tag will not react dynamically to AJAX calls of new content but will work with static load_template blocks.
  4. The site value tag will not work across print or email templates


Name Options Description
`id:''` String The unique ID of content you'd either like to store or load
`type:''` `load` Without type `load` specified the tag will by default set the content. When the type is set to load it will load based on the ID.
`type:''` `reset` Resets the stored value to nothing.

Was this article useful?

Be notified when this page is updated. Optional.