Zen Cart Logo
Forums / General Questions / EZ page with internal link, but without header and sideboxes

EZ page with internal link, but without header and sideboxes

Views: 1,498

Results 1 to 5 of 5
26 May 2011, 8:04 PM
#1
xavierpages avatar

xavierpages

New Zenner

Join Date:
Apr 2011
Posts:
22
Plugin Contributions:
0

EZ page with internal link, but without header and sideboxes

Hi,
I am trying to create a popup page with Terms and Conditions, but without website's main header nor sideboxes. I would like to use the Conditions page definition that I have in the usual html_includes language folder, instead of re-defining the page again in the ez-pages admin tool.
I have tried the internal link to conditions page in ez-pages, but it shows the header and sideboxes...
Any ideas for that? Thank you in advance,
Xavier.

27 May 2011, 12:20 AM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: EZ page with internal link, but without header and sideboxes

Are you managing to get the page to "pop-up" ?

If you are using ZC version 1.3.9h, then you can apply PAGE-SPECIFIC stylesheets.

Now, I am not sure if this would work in the popup (though I can see no logical reason for it not to), but if you create a PAGE-SPECIFIC stylesheet for the relevant EZPage, then you can control what elements display simply by using the #xxxxxxx {display: none;} declaration.

For example, if you wanted a page to appear that did NOT display the header section, you would include the following declaration in your Page-Specific stylesheet:

#headerWrapper {display:none;}

The NAME given to a PAGE-SPECIFIC stylesheet is this...

pageXX.css

... where " XX " is that EZPage's ID number.

So, for an EZPage that has an ID of 6 ...

page6.css

(Load that stylesheet into the css folder of your current template.)

All you need do is detemine the DIV style classes or ID's for the columns and header (which I have done for you above), and apply the display:none declarations.

27 May 2011, 8:26 AM
#3
xavierpages avatar

xavierpages

New Zenner

Join Date:
Apr 2011
Posts:
22
Plugin Contributions:
0

Re: EZ page with internal link, but without header and sideboxes

Thank you for your help!
I have tried your solution but it does not work for me (I am probably doing something wrong).

By the way, I have found that I can remove specific header and sideboxes from admin>config>ez-pages settings. But I still don't get the intended result (even leaving a part the popup feature):

  1. I have defined my ez-page (ID=5) without html content, only an internal link to index.php?main_page=conditions.

  2. If I write a link to my ez-page:
    <a href="http://www.mywebsite.com/index.php?main_page=page&id=5">ez-page</a>
    I get the ez-page title without content, and also without main header and sideboxes (I would expect to have the content of my conditions page, without main header and sideboxes).

  3. If I use:
    <a href="<?php echo zen_ez_pages_link(5); ?>">ez-page</a>
    Then I only get a simple link to my conditions page, which appears with its main header and sideboxes...

What I am doing wrong???
Thanks again.

28 May 2011, 9:23 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: EZ page with internal link, but without header and sideboxes

A page-specific stylesheet will only work for a PAGE, not a LINK.

You can't embed PHP code into an EZPage (without some re-coding to some other files), because the chronology of the page load means that the page has been assembled before the EZPage content is brought in from the database.

If you want to create a popup, then you would probably be better off CLONING (copying) the functions that drive other popups, such as Gift Certificate FAQ.

31 May 2011, 7:24 AM
#5
xavierpages avatar

xavierpages

New Zenner

Join Date:
Apr 2011
Posts:
22
Plugin Contributions:
0

Re: EZ page with internal link, but without header and sideboxes

Yes, I have cloned the "popup_search_help" folder in /includes/modules/pages to "popup_conditions".
Then I have created a folder in /includes/templates/mytemplate
called popup_conditions with a template inside called "tpl_main_page.php" with the desired content (in my case the terms and conditions page).
I call the page with:
https://www.mysite.com/catalog/index.php?main_page=popup_shippinginfo
It worked perfectly! I have a popup window with the conditions without any header or sidebox.
Thank you for your help!