Forums / Templates, Stylesheets, Page Layout / Images for the Nav links

Images for the Nav links

Locked

Views: 727

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
13 Sep 2010, 8:14 PM
#1
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

Images for the Nav links

I am wondering if it's possible to replace the text in the Nav Menu with images that would match the font in my header. I did manage to increase the size on the links (upper right).

https://www.battlefrontgames.biz

I know I am limited to just a few standard fonts so I think a graphic is the only other way to go.

Any ideas?

13 Sep 2010, 8:43 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Images for the Nav links

The links are output by /includes/templates/your_template/common/tpl_header.php. Unless the output constants are used elsewhere, you can rework the defines to be HTML images instead of text. Any that are used elsewhere would have to be hard-coded in tpl_header.php, or new constant names created there and defined in a language file.```php

<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> ``` HEADER_TITLE_CATALOG HEADER_TITLE_LOGOFF HEADER_TITLE_MY_ACCOUNT HEADER_TITLE_LOGIN HEADER_TITLE_CART_CONTENTS HEADER_TITLE_CHECKOUT

are the constants to check. If they are not used elsewhere, you can redefine them as images.

13 Sep 2010, 8:55 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Images for the Nav links

HEADER_TITLE_CATALOG is used in the footer and breadcrumbs as well as the header, so create a new constant HEADER_TITLE_CATALOG_IMG to use in the header.php <ul class="back"> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG_IMG; ?></a></li> In /includes/languages/english/your_template/header.php, add the new define below the original:```php
define('HEADER_TITLE_CATALOG', 'Home');
define('HEADER_TITLE_CATALOG_IMG', zen_image(DIR_WS_TEMPLATE . 'buttons/' . $_SESSION['language'] . '/headernav_home.gif'));

Save the image as /includes/templates/your_template/buttons/english/headernav_home.gif.
(This allows other languages to be used easily.)

You can use the same method for any others you need to redo.
13 Sep 2010, 9:06 PM
#4
battlefront_games avatar

battlefront_games

New Zenner

Join Date:
Aug 2010
Location:
Illinois
Posts:
33
Plugin Contributions:
0

Re: Images for the Nav links

Ok, I'm on it.

Thanks for the quick reply.