Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Remove custom links from popup page

Remove custom links from popup page

Locked

Views: 1,631

Results 1 to 17 of 17
This thread is locked. New replies are disabled.
20 Jul 2008, 3:42 AM
#1
bswinnerton avatar

bswinnerton

New Zenner

Join Date:
Jul 2008
Location:
Connecticut
Posts:
77
Plugin Contributions:
0

Remove custom links from popup page

Hey everyone,

I customized my html_header.php to include a few links on the top of the page above everything zen cart. But whenever I click view larger image, the links are there (Which I don't want).

How can I make it so that when looking at the larger images those links don't show up?

Thanks!

20 Jul 2008, 4:08 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,604
Plugin Contributions:
0

Re: Remove custom links from popup page

Use the overrides system properly.

20 Jul 2008, 4:11 AM
#3
bswinnerton avatar

bswinnerton

New Zenner

Join Date:
Jul 2008
Location:
Connecticut
Posts:
77
Plugin Contributions:
0

Re: Remove custom links from popup page

Excuse my obvious ignorance...

Could you explain?

20 Jul 2008, 2:00 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Remove custom links from popup page

I'm not sure exactly what you're doing - could we have a link to your site/

20 Jul 2008, 5:39 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Remove custom links from popup page

As you said, you added the logo and navigation links 'above everything Zencart'.

That large image popup is a 'thing Zencart', so you're getting what you asked for.

I'd suggest you put the logo and navigation links in the Zencart header - that will solve this particular problem.

Your next problem will come when you update to the next Zencart version - all your template changes will be overwritten because you haven't created your custom template. (Instructions in tutorials/FAQ above.)

Your site looks pretty good, but you're doing some 're-invention of the wheel' with the additions and tables you've added. Lot easier to work within the Zencart system.

21 Jul 2008, 11:53 AM
#7
bswinnerton avatar

bswinnerton

New Zenner

Join Date:
Jul 2008
Location:
Connecticut
Posts:
77
Plugin Contributions:
0

Re: Remove custom links from popup page

If I put it in the zen cart header, will it still be above everything like it is now?

and I believe I have created a custom template, I just copied everything from the default one, and put it into mine and started to edit it.

21 Jul 2008, 12:06 PM
#8
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Remove custom links from popup page

Yes, that's the area where the header usually appears.

Viewing the source on your site, it says you're using the 'classic' template.

When you created a custom template, did you select it in Admin - Tools - Template Selection ?

21 Jul 2008, 12:16 PM
#9
bswinnerton avatar

bswinnerton

New Zenner

Join Date:
Jul 2008
Location:
Connecticut
Posts:
77
Plugin Contributions:
0

Re: Remove custom links from popup page

Woops! I moved the template over, but never actually set it. Stupid me. I'll move it over tonight.

Where is the header file that I should edit?

Thank you for all of your help.

24 Jul 2008, 3:24 AM
#10
bswinnerton avatar

bswinnerton

New Zenner

Join Date:
Jul 2008
Location:
Connecticut
Posts:
77
Plugin Contributions:
0

Re: Remove custom links from popup page

Sorry, Just to bump this a little bit. Which header file should I be editing?

24 Jul 2008, 4:23 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Remove custom links from popup page

Instead of html_header.php you might try tpl_header.php

24 Jul 2008, 4:49 PM
#12
bswinnerton avatar

bswinnerton

New Zenner

Join Date:
Jul 2008
Location:
Connecticut
Posts:
77
Plugin Contributions:
0

Re: Remove custom links from popup page

Placing it in tpl_header.php places the links inside of the zen-cart table =/

24 Jul 2008, 5:56 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Remove custom links from popup page

As documented in various places including our wiki and various download contributions, the page is built from a combination of:

html_header.php
tpl_main_page.php
-- which includes:
-- -- tpl_header.php
-- -- then sideboxes etc
-- -- then the main body for the selected page
-- -- then more sideboxes if appropriate
-- -- then tpl_footer.php

Make your changes wherever you see fit.

25 Jul 2008, 1:32 PM
#14
bswinnerton avatar

bswinnerton

New Zenner

Join Date:
Jul 2008
Location:
Connecticut
Posts:
77
Plugin Contributions:
0

Re: Remove custom links from popup page

Are there any files that I could edit that would allow the popup page to use a seperate html_header.php?

28 Jul 2008, 2:35 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Remove custom links from popup page

To elaborate on my prior post:

  • html_header.php has a purpose: to output all the HTML content that goes between the <head> tags of the page. Clearly any content you intend to actually "show" on the page should never be part of that.

Thus, as has been stated earlier, use tpl_header.php for your header content.

If you don't like "where" the header gets inserted into the page output, feel free to alter tpl_main_page.php, which is the containing "shell" which calls the tpl_header.php file at the appropriate time.

You said you don't like the "table". So, don't use it. Or rearrange it. Or change it however needed to suit your needs. Just remember to test and be sure that your approach is compatible with all browsers your customers will use.

29 Jul 2008, 1:04 AM
#16
bswinnerton avatar

bswinnerton

New Zenner

Join Date:
Jul 2008
Location:
Connecticut
Posts:
77
Plugin Contributions:
0

Re: Remove custom links from popup page

Thank you for that clarification DrByte, but I can't seem to find where tpl_main_page.php calls tpl_header.php I see wehre the variable is defined ($header_template = 'tpl_header.php';), but nothing about the variable after that.

29 Jul 2008, 4:31 PM
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Remove custom links from popup page

bswinnerton:

Thank you for that clarification DrByte, but I can't seem to find where tpl_main_page.php calls tpl_header.php I see wehre the variable is defined ($header_template = 'tpl_header.php';), but nothing about the variable after that.

When I open /includes/templates/template_default/common/tpl_main_page.php from a fresh install of Zen Cart, I see the following starting on line 65:```

<?php /** * prepares and displays header output * */ if (CUSTOMERS_APPROVAL_AUTHORIZATION == 1 && CUSTOMERS_AUTHORIZATION_HEADER_OFF == 'true' and ($_SESSION['customers_authorization'] != 0 or $_SESSION['customer_id'] == '')) { $flag_disable_header = true; } [B] require($template->get_template_dir('tpl_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_header.php');?>[/B]