Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Pull ezPages header bar info to use in (non-zen) parts of site

    I have some parts of a site that are not Zencart, but I want to display the ezypages header/menu bar on these pages as well, i did something like this ages ago, but never saved my work, so i know its doable but for the life of me I can't seem to get the functions to dance how i want them to,

    Last time I used a cron job (updating daily) to create an "html include" of the zen ezpages bar which could then be included in the non zen sections of the site, Stupid thing is the zen code doesn't appear to have changed but you think I can remember what the heck I did to create the include.

    Any help would be appreciated
    Webzings Design
    Semi retired from Web Design

  2. #2
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Pull ezPages header bar info to use in (non-zen) parts of site

    Quote Originally Posted by nigelt74 View Post
    I have some parts of a site that are not Zencart, but I want to display the ezypages header/menu bar on these pages as well, i did something like this ages ago, but never saved my work, so i know its doable but for the life of me I can't seem to get the functions to dance how i want them to,

    Last time I used a cron job (updating daily) to create an "html include" of the zen ezpages bar which could then be included in the non zen sections of the site, Stupid thing is the zen code doesn't appear to have changed but you think I can remember what the heck I did to create the include.

    Any help would be appreciated
    I don't think I'm even close to giving you an answer, but I certainly would like to understand the question better. Ezpages is basically information contained in the database and there happens to be a few "tools" to translate that into a desired effect. I've seen a number of different "menu bars" that seem to use the ezpages information, so what is it that you are trying to "html include" that you can't pull from the database without something fancy? Or are you just trying to use various zencart functions so that ZC formats the data for you before you handle it with the non ZC page(s)? Please elaborate.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Sep 2005
    Location
    Waikato, New Zealand
    Posts
    1,539
    Plugin Contributions
    3

    Default Re: Pull ezPages header bar info to use in (non-zen) parts of site

    Yep I was going to try and use zencarts native functions to get it formatted etc before it goes to the non-zen pages.

    Having said that, I have thrown that in the too hard basket and am just going to pull the info straight from the database and format it, with the script that creates the "html include" something like

    Code:
    select * from ezpages where status_header = 1 order by header_sort_order
    
    
    if ($alt_url != '') { //The section spits out a result if a URL is set for the page
    	if(substr($alt_url, 0, 4) == "http") {}
    	elseif(substr($alt_url, 0, 3) == "www") {$alt_url = 'http://'.$alt_url;}
    	else {$alt_url = '/'.$alt_url;}
    	echo '<li><a href="'$alt_url'">'.$pages_title.'</a></li>';
    	}
    else { // this section generates the url for pages created in the ezpages bit, i don't use chapters so its simple here
    
    
    	echo '<li><a href="/index.php?main_page=page&id='.$pages_id.'">'.$pages_title.'</a></li>';
    	
    
    }
    Note that isn't real working code thats just me mapping out what i want to do
    Webzings Design
    Semi retired from Web Design

  4. #4
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: Pull ezPages header bar info to use in (non-zen) parts of site

    Quote Originally Posted by nigelt74 View Post
    Yep I was going to try and use zencarts native functions to get it formatted etc before it goes to the non-zen pages.

    Having said that, I have thrown that in the too hard basket and am just going to pull the info straight from the database and format it, with the script that creates the "html include" something like

    Code:
    select * from ezpages where status_header = 1 order by header_sort_order
    
    
    if ($alt_url != '') { //The section spits out a result if a URL is set for the page
        if(substr($alt_url, 0, 4) == "http") {}
        elseif(substr($alt_url, 0, 3) == "www") {$alt_url = 'http://'.$alt_url;}
        else {$alt_url = '/'.$alt_url;}
        echo '<li><a href="'$alt_url'">'.$pages_title.'</a></li>';
        }
    else { // this section generates the url for pages created in the ezpages bit, i don't use chapters so its simple here
    
    
        echo '<li><a href="/index.php?main_page=page&id='.$pages_id.'">'.$pages_title.'</a></li>';
        
    
    }
    Note that isn't real working code thats just me mapping out what i want to do
    Well, just did a quick search in the files, there is at least one file that is dedicated to ezpages:

    includes/functions/functions_ezpages.php

    function zen_ez_pages_link

    includes/modules/ezpages_bar_header.php

    etc... Maybe one or more of those will help with your development?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. navMain area and EZPages Header Bar
    By autoace in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 16 Sep 2009, 05:05 PM
  2. Icons for links in Ezpages bar header
    By strokerstees in forum General Questions
    Replies: 19
    Last Post: 15 Jul 2009, 04:29 AM
  3. Add search box to EZpages header bar
    By sandstoner in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 18 Sep 2008, 03:02 AM
  4. non members rights to see other parts of the site
    By Erica in forum General Questions
    Replies: 1
    Last Post: 17 Mar 2007, 02:34 AM
  5. EZpages header bar
    By scottb in forum General Questions
    Replies: 1
    Last Post: 14 Nov 2006, 10:23 PM

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