Versions Compared

Key

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

TODOUCTODO-UC: Explain

 

...

Code Block
languagexml
themeDJango
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/
##

##  See the comments below.  Comments are preceded by double no. signs (##)
 
## This theme attribute is used to notify the theme that it should not generate 
## a breadcrumb since only the checkout is used.
## uc:theme-attribute-boolean="Checkout Only Theme"

<!-- breadcrumb -->
## if the following attribute is false, generate a breadcrumb
#if($theme.attr("Checkout Only Theme", "false") != "true")
 <div class="row no-margin-top">
  <div class="columns small-16 medium-13">
   <div class="breadcrumb">
    <ul>
    #if ($requestURI && $requestURI.contains("/checkout/"))
     <li><a href="/">Home</a></li>
     <li>Checkout</li>
    #else
 
## The breadbrumb trail will look at a $group object (represents a product group), and travel
## up through all the parents of that group to contructs an ancestry.   That list of ancestors
## is then looped through and links created for each one.
     #foreach($crumb in $breadcrumbHelper.getBreadcrumbTrail($group))
 
## ignore 1) the current page, 2) the /products/ directory, and 3) the /info/ directory.
      #if($crumb.path != $group.path && $crumb.path != "/products/" && $crumb.path != "/info/")
       <li>
          <a href="$baseUrl$crumb.path">$crumb.title</a>
       </li>
      #end
      #end

#end  ##end-for each crumb
 
## after listing out all the parents, deal with the current page.
## if $item is false, then this is a product group page.  So use the group title.
     #if(!$item)
## if the title is long, truncate it
      #if($group.getTitle().length() > 35)
       <li>$formatHelper.excerpt($group.title, 35)&hellip;</li>
      #else
       <li>$group.title</li>
      #end

## if this is a specific product page, create a breadcrumb for the direct parent page (it's not part of the crumbs above)
## then create a crumb for the product page itself.
     #else
      <li>
       <a href="$baseUrl$group.path">$group.title</a>
      </li>
       #if($item.getTitle().length() > 35)
       <li>$formatHelper.excerpt($item.description, 35)&hellip;</li>
      #else
       <li>$item.description</li>
      #end
     #end
    #end
    </ul>
   </div>
  </div>
 </div>
#end
<!-- /breadcrumb -->