Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Link to contact Us page in header

Link to contact Us page in header

Locked

Views: 3,214

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
6 Feb 2007, 11:57 AM
#1
gregoryjameswood avatar

gregoryjameswood

New Zenner

Join Date:
Jan 2007
Posts:
30
Plugin Contributions:
0

Link to contact Us page in header

Hi there,

I've made a completely custom template, and I've just realised I need a link to the contact page in the header.

My template does not use any of the side/information boxes so I've been copying the contact us part of the information.php code to my header template to no avail.

here's my most recent attempt :

tpl_header.php - navigation where I want the contact us link

<div id="navigation">
    
        <ul class="back">
            <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
            <?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
            <?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
            <?php require($template->get_template_dir('tpl_contact_us_link_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_contact_us_link_header.php'); ?>
        </ul>
        
    </div>
```and here's the template tpl_contact_us_link_header.php I created from the contact us excerpt from information.php

<?php if (DEFINE_CONTACT_US_STATUS <= 1) { $information[] = '<li><a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . BOX_INFORMATION_CONTACT . '</a></li>'; } ?>

cheers.
6 Feb 2007, 2:04 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Link to contact Us page in header

if you can switch to the classic template you will find that this link by default is along this line:

http://www.your_domain.com/index.php?main_page=contact_us

so where you have your ul as:

<ul class="back"> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> <?php
require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?> <?php
require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?> <?php
require($template->get_template_dir('tpl_contact_us_link_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_contact_us_link_header.php'); ?> </ul>

I would replace that with:

<li><a href="http://www.your_domain.com/index.php?main_page=contact_us''>Contact Us</a>;
</ul>