Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Oct 2012
    Location
    Haysville, Ks
    Posts
    13
    Plugin Contributions
    0

    help question Display Ez-Page Content in Sidebox

    I have created some new sideboxes using the Blank Sidebox Mod to display images. It is working correctly. However, I have to edit the file I created call "page"_sidebox_defines.php in order to change the content. I created specific sideboxes for each of my pages (11). So it's going to be a lot of content editing and uploading. What I would like to do is edit the content through an ez-page.

    What file(s) do I need to edit and how would the line code be written.

    The page I am working on is http://prymlurg.com/index.php?main_page=page&id=9 if you would like to see what I'm talking about.

    Any help would be appreciated. If there is a thread already out there, I have not been able to find it.

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Display Ez-Page Content in Sidebox

    Quote Originally Posted by PrymlUrg View Post
    I have created some new sideboxes using the Blank Sidebox Mod to display images. It is working correctly. However, I have to edit the file I created call "page"_sidebox_defines.php in order to change the content. I created specific sideboxes for each of my pages (11). So it's going to be a lot of content editing and uploading. What I would like to do is edit the content through an ez-page.

    What file(s) do I need to edit and how would the line code be written.

    The page I am working on is http://prymlurg.com/index.php?main_page=page&id=9 if you would like to see what I'm talking about.

    Any help would be appreciated. If there is a thread already out there, I have not been able to find it.
    Content for EZpages is stored in the database - not in files. So you can't develop an editing function using this resource.

    There is no feature available to edit sidebox content through a wysiwyg editor - mainly because sideboxes are not used for the purpose you are using them.

    I don't think those unclear and postage-stamp size images do your products any favours. Then you've gone to great lengths to add some ugly image zoom feature. It's all bitty and all over the place and generally messy. You should just use the normal product display features of zencart - much easier - much more effective - and (in truth) much more appealing.
    20 years a Zencart User

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Display Ez-Page Content in Sidebox

    You could copy and adapt the ez-page output code to fit a sidebox, then make an ez-page that is set to not display in any menus, but only called up by this sidebox.

    You would first adapt this line from /includes/modules/pages/page/header_php.php:
    PHP Code:
    $var_pageDetails $db->Execute("select * from " TABLE_EZPAGES " where pages_id = " . (int)$ezpage_id ); 
    You might possibly want other lines from that file, depending on exactly how you want to handle the functionality. In the simplest variant, using one sidebox to output one specific ez-page, you would just adapt this line from /includes/templates/template_default/templates/tpl_page_default.php:
    PHP Code:
        <div><?php echo $var_pageDetails->fields['pages_html_text']; ?></div>
    You might use code like this in your blank sidebox module file:
    PHP Code:
    $side_ezpage_id 23;//replace 23 with whatever ez-page id you want to display
    $sidebox_pageDetails $db->Execute("select * from " TABLE_EZPAGES " where pages_id = " . (int)$side_ezpage_id );
    $content .= $sidebox_pageDetails->fields['pages_html_text']; 

  4. #4
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Display Ez-Page Content in Sidebox

    Hi Glenn,

    I am not sure I understood your suggestion, i.e. which code goes where exactly, nevertheless I tried some combination, and needless to say it did not work.

    Will you please kindly help me understand it better?
    Do I need to edit
    /includes/modules/pages/page/header_php.php
    and
    /includes/templates/template_default/templates/tpl_page_default.php

    Do I put the third snip all into the includes/modules/sideboxes/blank_sidebox.php
    or do I need to split it, and put some of it in
    includes/templates/CUSTOM/sideboxes/tpl_blank_sidebox.php

    Thank you

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Display Ez-Page Content in Sidebox

    Hmm... thinking back two years, and not researching the files again, I believe you would just put the third snippet in the blank_sidebox.php file, adjusted for the ez-page id in question. It would need to be put in the right sequence in that file, so if you post the file as you have it, I could make suggestions.

    There would be no editing of existing files.

    How did it "not work"? What was the actual result?

  6. #6
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Display Ez-Page Content in Sidebox

    Thank you.

    Quote Originally Posted by gjh42 View Post
    How did it "not work"? What was the actual result?
    The box is blank, save the title, and other text that I have in the languages extra definitions file.
    The page loads fine, no breaking.

    I am sure you know it, but in case you need to search for it, blank sidebox has 3 files:
    includes/modules/sideboxes/blank_sidebox.php
    includes/templates/sideboxes/tpl_blank_sidebox.php
    includes/languages/english/extra_definitions/blank_sidebox_defines.php

    Here is the code for the includes/modules/sideboxes/blank_sidebox.php I am using:
    NOTE - I have renamed, and moved the box out of the sideboxex columns, but tested it as a sidebox as well with same result.

    PHP Code:
    <?php

      $show_evidenza_hp_sidebox 
    true;

      if (
    $show_evidenza_hp_sidebox == true) {
        require(
    $template->get_template_dir('tpl_evidenza_hp_sidebox.php',DIR_WS_TEMPLATE$current_page_base,'sideboxes'). '/tpl_evidenza_hp_sidebox.php');
        
    $title =  BOX_HEADING_EVIDENZA_HP_SIDEBOX;
        
    $title_link false;
        require(
    $template->get_template_dir('tpl_box_header.php',DIR_WS_TEMPLATE$current_page_base,'common'). '/tpl_box_header.php');
    }

    $side_ezpage_id 16;//replace 23 with whatever ez-page id you want to display
    $sidebox_pageDetails $db->Execute("select * from " TABLE_EZPAGES " where pages_id = " . (int)$side_ezpage_id );
    $content .= $sidebox_pageDetails->fields['pages_html_text'];

    ?>
    I did try adding the snippet on top of the original code as well, same blank output.

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Display Ez-Page Content in Sidebox

    What happens if you add a debug line or two?
    PHP Code:
    $content .= ' pre-test '
    $content .= $sidebox_pageDetails->fields['pages_html_text']; 
    $content .= ' post-test '

  8. #8
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Display Ez-Page Content in Sidebox

    Nothing happens, same blank box.
    The "pre-test", and "post-test" text are not diplayed either.

  9. #9
    Join Date
    May 2009
    Posts
    1,219
    Plugin Contributions
    2

    Default Re: Display Ez-Page Content in Sidebox

    I tried adding the query to includes/modules/pages/page/header_php.php file, and use the code from includes/templates/CUSTOM/templates/tpl_page_default.php to display the content, and I did get some content, but from another ez-page although the ID was set to the one I need!

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Display Ez-Page Content in Sidebox

    Not sure if this is connected to the "no output" in the sidebox, but your site is in Italian, right? Do you have any mods for multi-language ez-pages, or are you just using the base setup? Multi-language ez-pages uses two db tables, one for basic info and one for content, and this query
    PHP Code:
    $sidebox_pageDetails $db->Execute("select * from " TABLE_EZPAGES 
    will not return good results. The field 'pages_html_text' is no longer in the ezpages table, but in the other one.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Display EZ Page content in header (like a banner)
    By hockey2112 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 21 Jul 2010, 06:06 PM
  2. Can I put sidebox content into an EZ-Page?
    By makenoiz in forum General Questions
    Replies: 1
    Last Post: 8 Feb 2010, 03:10 AM
  3. Page Editor Content In Sidebox?
    By DivaVocals in forum Basic Configuration
    Replies: 1
    Last Post: 16 Feb 2007, 03:59 PM
  4. Display content of sidebox to a mainpage?
    By inksale in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 9 Sep 2006, 01:31 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