Zen Cart Logo
Forums / Basic Configuration / Information side box in header

Information side box in header

Locked

Views: 3,041

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
5 Aug 2006, 9:16 PM
#1
daveky avatar

daveky

New Zenner

Join Date:
Aug 2006
Location:
Manchester, UK
Posts:
36
Plugin Contributions:
0

Information side box in header

I know, I know. The title does not make a lot of sense!

I would like the links displayed in the information sidebox in the header instead of the category links.

So I edit /includes/templates/MY_TEMPLATE/templates/tpl_modules_categories_tabs.php to have the content of /includes/modules/sideboxes/tpl_information.php. eg

  include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORIES_TABS));
?>
<?php if (CATEGORIES_TABS_STATUS == '1' && sizeof($links_list) >= 1) { ?>
<div id="navCatTabsWrapper">
<div id="navCatTabs">
<ul>
<?php for ($i=0, $n=sizeof($links_list); $i<$n; $i++) { ?>
  <li><?php echo $links_list[$i];?></li>
<?php } ?>
</ul>
</div>
</div>
<?php } ?>

becomes just:

<div id="navCatTabsWrapper">
<div id="navCatTabs">
<ul>
<?php
  for ($i=0; $i<sizeof($information); $i++) {
    echo '<li>' . $information[$i] . '</li>';
  }
?>
</ul>
</div>
</div>

But of course all I get is an empty unordered list. I guess that's because $information is null or perhaps empty. How do I fill it? Where does the information sidebox get it's information from?

Cheers, D.

5 Aug 2006, 9:38 PM
#2
daveky avatar

daveky

New Zenner

Join Date:
Aug 2006
Location:
Manchester, UK
Posts:
36
Plugin Contributions:
0

Re: Information side box in header

OK, I found how it's filled.

/includes/modules/sideboxes/information.php

How can I reuse that file cleanly? Or do I just need to duplicate that code? D.

5 Aug 2006, 10:20 PM
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Information side box in header

STOP. Right now. Move away from the keyboard. Have a cup of tea, a beer, or some other suitable beverage, and then we'll go through a really easy way to do this. Provided of course, you're using Zen Cart 1.3 or later. Are you?

5 Aug 2006, 10:39 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Information side box in header

Hopefully you're sitting comfortably and have put all those code listings away ... you won't be needing them.

Each link in the information box ends with a name such as "contact_us" or "privacy", you can see them in your browser status bar (bottom left) when you hover over the links.

For each link create an EZ-Page, give it the name that you want to appear in the header link, click the radio button for header and give it a sort order value, ignore the HTML box, enter the "privacy" or whatever in the internal URL link field, save and it's done. Repeat for your other links.

Finally, ensure that the EZ-Pages header is turned on (Admin > Configuration > EZ-Pages Settings if it's not) and style it with CSS.

6 Aug 2006, 7:57 AM
#5
daveky avatar

daveky

New Zenner

Join Date:
Aug 2006
Location:
Manchester, UK
Posts:
36
Plugin Contributions:
0

Re: Information side box in header

I like the STOP. Actually I had done. I usually post questions as I finish up. I'm not used to such quick replies.

This is as 'boss requires' thing. I was using the category links section to have a nice curved css image appear underneath the banner/header for the site. But the boss says, "No, put the information links in there." So I can't just switch it off. So I thought I could just swap the links about.

I realise we can make EZ pages appear as a second bar under the header. However, we still want the information pages' content to be edited via the Define Pages Editor. We can't have duplicates. If we create EZ pages in the manner you suggest would they be linking to the define pages for editing? If so I can just change the css to put the curve on the EZ pages bar instead (can't I?). But if not, I'll need to put the Information links inside the category bar.

Of course, if anybody decides they want EZ pages too that could cause other issues. But I'll worry about that if it happens... D.

6 Aug 2006, 8:21 AM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Information side box in header

You would be using EZ-Pages to create the links not the pages themselves, so they will point to the existing pages, which can continue to be edited via the define pages editor. (Though as a side comment, pages created by EZ-Pages go into your database and are easily backed up and upgraded. Pages created and maintained by the Define Pages Editor sit in their own files and have a nasty habit of getting overwritten during upgrades)

Yes you can apply your styling to the EZ-Pages menu bar. The navCat bar is an unordered list, whereas EZ-Pages is just a list of links so if you wanted to style individualk items you might need to tweak your styling, or adjust your tpl_ezpages_ bar_header.php template to turn it into an unordered list.

If somebody else wanted to create EZ-Pages it would be a problem only if they wanted to display them in a different link bar in the header. Otherwise you can set them to appear in a sidebox or the footer, or just include them with your information links in the header and set the order they appear.

8 Aug 2006, 1:44 PM
#7
daveky avatar

daveky

New Zenner

Join Date:
Aug 2006
Location:
Manchester, UK
Posts:
36
Plugin Contributions:
0

Re: Information side box in header

OK, I get you. This sounds promising. I will give it a go. It might be a little confusing for the end user but I don't think they will be diting/edding any of these pages without consulting me so it probably isn't much of an issue. I'll let you know how it goes. D.

4 Nov 2010, 7:57 AM
#8
heyits007 avatar

heyits007

Zen Follower

Join Date:
Sep 2010
Posts:
270
Plugin Contributions:
0

Re: Information side box in header

When I set EZ-Pages links to appear in header, it creates a second header menu bar below the top menu bar. I really want the EZ-Pages links to appear in the top header menu bar next to the Home Page and Log In Links. I don't want to have a second header menu bar below. Any idea how to achieve this ?

Thanks,
007