Glossary Item Box

Squirrelcart v6.1.0

Storefront - Content Template

Overview

With the exception of the store's home page, the main content area shown below is controlled by the store_content.tpl.php template file, regardless of the page being viewed.

store content 

Template Code

This section explains the code in this template. The default code for this template looks like this:

 1: <?php /* This line prevents direct access to template. Don't remove it. */ if (!defined('SC_INCLUDE_OK')) die; ?>
 2: <!-- Template: <?php print basename(__FILE__) ?>
-->
 3:
 4: <?php if (isset($SC['msg_generic'])):
?>
 5:     <div class="sc_msg_generic"
>
 6:          <?php print $SC['msg_generic']
?>
 7:     </div
>
 8: <?php endif;
?>
 9:
10: <?php print sc_breadcrumb_nav()
?>
11:
12: <div class="sc_content sc_main_content"
>
13:      <?php print $Cart_Content;
?>
14: </div>

 

Line #1:

This ensures that this file is only included by Squirrelcart, and is a security precaution. It appears at the top of all template files.

 

Line #2:

This line appears in all templates. It outputs an HTML comment to make it easiery to locate the template file by viewing the source code.

Example:

<!-- Template: store_main -->

 

Lines #4 - 8:

This prints any messages that need to be shown to the customer that aren't specific to the page being viewed.

 

Line #10:

This prints the breadcrumb navigation on pages that require it. The template that controls that navigation is breadcrumb_nav.tpl.php

 

Lines #12  - 14:

This prints the content corresponding to the page being viewed.

 

 


© 2001-2017 Lighthouse Development. All Rights Reserved.