Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Posts
    9
    Plugin Contributions
    0

    Default Sidebox include external file?

    I'm trying to get an external menu included in sidebox

    Sidebox shows up ok, but I'm trying to have:

    PHP Code:
    <?PHP include("menu.php"); ?>


    in there.

    I've tried putting it in the
    /language/english/CUSTOM/sideboxes/menu_sidebox_defines.php

    if I put plain text in the contents section it shows, but not the PHP code. It should be trying to include it from the site html directory, right?

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Sidebox include external file?

    You first need to thouroughly understand how the sideboxes are generated.
    The file includes/modules/sideboxes/sidebox_name.php retrieves relevant data from the database if required, and/or from the defines within it. It also determines the sidebox template file to be used, and the final layout box that is used to display the information.
    The sidebox template (includes/templates/template_default/sideboxes/tpl_sidebox_name.php) formats the content, and puts it all into the variable $content.
    The final rendering is then done by the file includes/templates/template_default/common/tpl_box_default_left.php (or right.php).
    That file simply takes the content of the variable $content that is sent to it by the sidebox template.

    What you will need to do is customize your sidebox module and sidebox template, and use a separate tpl_box_my_left.php to display it - that way you will be able to put your include statement where you need it to be so your content gets included correctly.
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  3. #3
    Join Date
    Jan 2009
    Posts
    2,123
    Plugin Contributions
    0

    Default Re: Sidebox include external file?

    Not sure what sidebox you're trying to modify, but I use the blank_sidebox_2-0 mod as the boxes are pretty versatile.

    I have about a dozen custom sideboxes, all with menus inside them, although my menus are html.

  4. #4
    Join Date
    Mar 2009
    Posts
    38
    Plugin Contributions
    0

    Default Re: Sidebox include external file?


 

 

Similar Threads

  1. v151 External text file
    By Kevin205 in forum General Questions
    Replies: 13
    Last Post: 28 Apr 2013, 03:06 AM
  2. Can I include external data via ajax in my shopping cart page?
    By tiffbrink in forum General Questions
    Replies: 1
    Last Post: 26 Feb 2013, 08:32 PM
  3. 'include' php file
    By vandiermen in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 6 Sep 2011, 05:41 PM
  4. single sidebox for external file
    By delia in forum All Other Contributions/Addons
    Replies: 16
    Last Post: 3 Jan 2008, 08:45 AM
  5. Single Sidebox for External File image problem
    By aunrea in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 5 Jul 2007, 09:32 PM

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