Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Is there a list of what is in all the template files?

Is there a list of what is in all the template files?

Locked

Started by jegelstaff on 29 Nov 2006, 10:57 PM · Views: 1,347

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
29 Nov 2006, 10:57 PM
#1
jegelstaff avatar

jegelstaff

New Zenner

Join Date:
Nov 2006
Posts:
4
Plugin Contributions:
0

Post #1 by jegelstaff

Hello,

Thank you to all the community members who have contributed to the FAQs and the wiki, it has all been very helpful in explaining how the powerful templating system works.

I have not been able to find the one thing that would benefit me the most though...a simple list of what all the files are in the default template, and what parts of the page they contain.

I think this would be very useful when trying to modify specific parts of the page. I think most filenames are self-explanatory actually, but I have been looking for this info because no matter what, I cannot find a place to modify some of the material near the top of the page, I think it's the header, but none of the files that are named anything remotely like "header" seem to contain the necessary info.

The part of the default page that I want to modify (or remove) looks like this, when you view-source (I have altered the URLs, so if they look funny, that's why):

<!--bof-header logo and navigation display-->

<div id="headerWrapper"> <!--bof-navigation display--> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><a href="/store/">Home</a></li>
<li><a href="/store/index.php?main_page=login">Log In</a></li>
</ul> </div> <div id="navMainSearch"></div> <br class="clearBoth" /> </div> <!--eof-navigation display--> <!--bof-branding display--> <div id="logoWrapper"> <div id="logo"><a href="/store/"><img src="includes/templates/template_default/images/logo.gif" alt="Powered by Zen Cart :: The Art of E-Commerce" title=" Powered by Zen Cart :: The Art of E-Commerce " width="192" height="64" /></a></div> <div id="taglineWrapper">
  <div id="tagline">TagLine Here</div>
</div>
</div> <br class="clearBoth" /> <!--eof-branding display--> <!--eof-header logo and navigation display--> <!--bof-optional categories tabs navigation display--> <div id="navCatTabsWrapper"> <div id="navCatTabs"> <ul> <li><a class="category-top" href="/store/index.php?main_page=index&cPath=2">Software</a> </li> </ul> </div> </div> <!--eof-optional categories tabs navigation display--> <!--bof-header ezpage links--> <div id="navEZPagesTop"> <a href="/store/index.php?main_page=page&id=1&chapter=10">EZPages</a> ::  <a href="/store/index.php?main_page=privacy">Privacy Notice</a> ::  <a href="/store/index.php?main_page=page&id=6&chapter=0">Shared</a> :: 

<a href="http://www.zen-cart.com" target="_blank">Zen Cart</a>

</div> <!--eof-header ezpage links--> </div>

From looking at the tpl_main_page.php file, it appears that this is all generated somehow from the tpl_header.php file. But I have not been able to figure out how or where it is coming from exactly.

Files I have checked out include:

tpl_box_header.php
tpl_header.php
html_header.php

But obviously they don't help. If anyone can shed some light on this, I would be very grateful. Thanks!

--Julian

29 Nov 2006, 11:27 PM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Post #2 by clydejones

Here's the information you need from TPL_HEADER.PHP

What you've posted is the rendered page taken from a view source in your browser. The code that renders that page won't look the same.

<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>

<div id="headerWrapper">
<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?php if ($_SESSION['customer_id']) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php
      } else {
        if (STORE_STATUS == '0') {
?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>

<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
</div>
<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->

<!--bof-branding display-->
<div id="logoWrapper">
    <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
    <div id="taglineWrapper">
<?php
              if (HEADER_SALES_TEXT != '') {
?>
      <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div>
<?php
              }
?>
<?php
              if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                if ($banner->RecordCount() > 0) {
?>
      <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>
<?php
                }
              }
?>
    </div>
<?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>
</div>
<br class="clearBoth" />
<!--eof-branding display-->

<!--eof-header logo and navigation display-->

<!--bof-optional categories tabs navigation display-->
<?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
<!--eof-optional categories tabs navigation display-->

<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->
</div>
<?php } ?>

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

30 Nov 2006, 4:36 AM
#3
jegelstaff avatar

jegelstaff

New Zenner

Join Date:
Nov 2006
Posts:
4
Plugin Contributions:
0

Post #3 by jegelstaff

Thank you! I must be going nuts. I looked in tpl_header.php (probably first, it does seem like the obvious choice) but I guess because of how it looked on the screen, I thought the file ended with only:

<?php
// Display all header alerts via messageStack:
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
echo htmlspecialchars(urldecode($_GET['error_message']));
}
if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
echo htmlspecialchars($_GET['info_message']);
} else {

}
?>

That was the bottom of the screen, and with the ?> tag, it looked like the end of the file. But of course, it goes on at length. Scrollbars -- don't overlook them!

Thank you very much,

--Julian