Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

At the top, add the directive.  Begin the line with two pound signs (##) so the velocity scripting engine ignores these lines.  See line 21.

Code Block
linenumberstrue
##
## UltraCart - Mr Teas Template
## http://www.ultracart.com/
##
## Copyright (c) 2015 BPS Info Solutions Inc.
## License located here:
## http://www.ultracart.com/storefront/license/
##
## Designed by Level 2 Design, LLC http://www.level2d.com/
##

## uc:contains-velocity="true"
## uc:page-type="group"
## uc:display-items="true"
## uc:pagination="true"
## uc:display-subgroups="true"
## uc:child-page-multimedia-default-used="true"
## uc:page-attribute-string="subtitle||.catalog-title"
 
## HERE IS THE NEW DIRECTIVE!
## uc:page-attribute-html="sale info||.sale-info-container"

#parse("/snippets/checkout_only_redirect.vm")
#parse("/snippets/google_base_offer_id.vm")

...

Wherever you desire, add your container and attribute.  See line 26.

Code Block
languagexml
linenumberstrue
## uc:page-attribute-string="subtitle||.catalog-title"

## HERE IS THE NEW DIRECTIVE!
## uc:page-attribute-html="sale info||.sale-info-container"

#parse("/snippets/checkout_only_redirect.vm")
#parse("/snippets/google_base_offer_id.vm")
#parse("/snippets/top.vm")
	<div class="row no-margin">
    <div class="columns small-16">
      #parse("/snippets/breadcrumbs.vm")
    </div>
  </div>
  <div class="row">
    <div class="columns small-16">
      <h1 class="catalog-title">
        #if($group.getAttribute("subtitle") && $group.getAttribute("subtitle") != '')
          $group.getAttribute("subtitle")
        #else
          $group.Title
        #end
      </h1>
    </div>
  </div>

## =====================================================
## HERE IS THE ATTRIBUTE BEING USED!
  <div class="row sale-info-container">
    #if($group.getAttribute("sale info") && $group.getAttribute("sale info") != '')
      $group.getAttribute("sale info")
    #end    
  </div>
## =====================================================
 

  <div class="row">
    <section class="columns small-16 catalog-container">
      #if($group.getChildren().size() > 0)
        #parse("/snippets/subgroup_list.vm")

...