Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default Creating a link to a page without header

    What I'm trying to do seems like it should be super easy. I want to create a hyperlink in a page that when clicked opens up the linked page in a new window WITHOUT including the header, and all the other stuff. Basically, if this were html, I would want to create a link like:

    Code:
     <a href="http://www.mysite.com/mypage.htm" target="_blank">My Page</a>
    Better yet, what I've tried is this:

    Code:
     <a href="#" onclick="window.open('index.php?main_page=myNewPage', '_blank', 'scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=40,top=20'); return true">My New Page</a>
    I've gotten this to work, but it opens in a new window within the framework of my site (with the header, etc.). I just want the file by itself, which is just html.

    I've only found forum, wiki, tutorial references to something involving 4 files or javascript or zen functions, etc. If these are the only ways to do this, I'll figure it out. But there has to be an easy way to do this.

    Ideally, I'd be able to create the html or php file in EZ Pages (or Define Pages?) and then based on that EZ Page file, I can reference it in a code snippet on other pages.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Creating a link to a page without header

    Create a mypage.html file that represents what you want displayed and upload it to your server.

    Then using ezpages, link to this page as external i.e. http://mysite.com/mypage.html
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default Re: Creating a link to a page without header

    Thanks! I was able to get this to work (I actually used an internal link instead of external since I'll be changing servers). However, it does not actually open in a new window in Firefox. It works in IE, but not Firefox. This is the code I used:

    <?php echo zen_ez_pages_link(16, 0, false, true, true); ?>

    When I hover over the link on my site, the URL is this:
    Code:
    http://localhost/zencart/riotclubfaq.htm?target=&quot;_blank
    I also experimented with the New Window status in the EZ Page admin page, but that didn't seem to make a difference.

    Is there some way to force this to work in Firefox? I'm willing to mess with the code if necessary. Also, is there some way to control the new window that pops up, e.g., window size, removing the menu, scroll bars, etc.?

  4. #4
    Join Date
    Jun 2007
    Posts
    80
    Plugin Contributions
    0

    Default Re: Creating a link to a page without header

    I've gotten something to work. It's a hack as far as I'm concerned. This uses the window.open command so that I can get the page to open in both IE and Firefox with the parameters I want. I am totally open to better ways of doing this, if anyone has a suggestion.

    Code:
    <a href="#" onclick="window.open('<?php echo '' . $_GET['DIR_WS_LANGUAGES'] . ''?> <?php echo 'nutrition.htm'; ?>', '_blank', 'scrollbars=yes,resizable=yes,toolbar=no,directories=no,location=no,menubar=no,status=no,left=40,top=20'); return true">more nutrition info</a><br>
    The thing I'm winging and don't understand is the $_GET['DIR_WS_LANGUAGES'] call. It does what I need it to (returning http://mysite.com/), but I'm not sure if there's a better way to do this, AND the fact that I'm using DIR_WS_LANGUAGES (which I thought would point to http://mysite.com/includes/languages/ but doesn't). All of the other server variables just point to the root host too. So, is there more proper code I should be using?

    Again, if anyone has a better, easier way to do this whole thing, I'm listening!

 

 

Similar Threads

  1. How can I change link colors in header, without changing all other link colors?
    By coreyalderin in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 20 Jun 2012, 03:17 AM
  2. Creating NEW [MORE] LINK on sidebox header
    By willie bee in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Dec 2011, 10:25 PM
  3. EZ page with internal link, but without header and sideboxes
    By xavierpages in forum General Questions
    Replies: 4
    Last Post: 31 May 2011, 08:24 AM
  4. Creating a link to an Ez-Page
    By secarrol in forum Customization from the Admin
    Replies: 1
    Last Post: 24 Mar 2009, 06:41 AM
  5. Creating a 'Page Top' link / anchor
    By Website Rob in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 19 Mar 2009, 05:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR