Results 1 to 5 of 5
  1. #1
    Join Date
    May 2009
    Posts
    63
    Plugin Contributions
    0

    Default moving sidebar modules to header

    Hi! I am using 1.38a and was thinking about moving a sidebar module to the header - i'm using the manufacturer_info.php sidebar and want it to show up in the header section of my shop. Is there an easy solution for this?

    I put something like this in my tpl_header.php
    Code:
    <?php require(DIR_WS_MODULES . 'sideboxes/manufacturer_info.php'); ?>
    but that didn't work. It didn' t show anything but the header on my screen (sadly without the manufacturer_info box)

    Would be nice i anyone has a tip for me!
    cheers
    www.acousticsdb.com - soundproofing and room acoustics matters | webdesign hamburg

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: moving sidebar modules to header


  3. #3
    Join Date
    May 2009
    Posts
    63
    Plugin Contributions
    0

    Default Re: moving sidebar modules to header

    hi! Thank you for the answer - but i was looking to include only one module in the header and would prefer to do it by putting the right php code in the tpl_header.php and not using css. But if i fail to do it the php way i give this solution a shot.
    www.acousticsdb.com - soundproofing and room acoustics matters | webdesign hamburg

  4. #4
    Join Date
    May 2009
    Posts
    63
    Plugin Contributions
    0

    Default Re: moving sidebar modules to header

    well here' s how it could be done:

    edit .../your_template/common/tpl_header.php

    and put the relevant code from your sidebar modules in it - in my case i had to look into:

    /includes/modules/sideboxes/manufacturer_info.php
    and:

    /your_template/templates/tpl_manufacturers_about_default.php

    this is the code i put into to tpl_header.php and of course some styling in the css files...

    Code:
    <div id="header_manu">
    <?php
      $manufacturer_info_sidebox_query = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image,
    
                                      mi.manufacturers_url, mi.manufacturers_about
    
                               from " . TABLE_MANUFACTURERS . " m
    
                               left join " . TABLE_MANUFACTURERS_INFO . " mi
    
                               on (m.manufacturers_id = mi.manufacturers_id
    
                               and mi.languages_id = '" . (int)$_SESSION['languages_id'] . "'), " . TABLE_PRODUCTS . " p
    
                               where p.products_id = '" . (int)$_GET['products_id'] . "'
    
                               and p.manufacturers_id = m.manufacturers_id";
    
    
    
        $manufacturer_info_sidebox = $db->Execute($manufacturer_info_sidebox_query);
    
      $content = "";
    
    
    
          if (zen_not_null($manufacturer_info_sidebox->fields['manufacturers_image']))
    
      $content .= '<div style="float:right">' . zen_image(DIR_WS_IMAGES . $manufacturer_info_sidebox->fields['manufacturers_image'], $manufacturer_info_sidebox->fields['manufacturers_name']) . '</div>';
    
    
          if (zen_not_null($manufacturer_info_sidebox->fields['manufacturers_url']))
    
    /**
    
      $content .= '&nbsp;&nbsp;-&nbsp;<a href="' . zen_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $manufacturer_info_sidebox->fields['manufacturers_id']) . '">' . BOX_MANUFACTURER_INFO_OTHER_PRODUCTS . '</a>';
    **/
     $content = '';
    
          if (zen_not_null($manufacturer_info_sidebox->fields['manufacturers_about']))
    
      $content .= '<div><a href="' . zen_href_link(FILENAME_MANUFACTURERS_ABOUT, 'manufacturers_about_id=' . $manufacturer_info_sidebox->fields['manufacturers_id']) . '">' . BOX_MANUFACTURER_INFO_ABOUT . $manufacturer_info_sidebox->fields['manufacturers_name'] . '</a></div>';
    
      $content .= '';
    echo $content;
    
    ?>
    </div>
    www.acousticsdb.com - soundproofing and room acoustics matters | webdesign hamburg

  5. #5
    Join Date
    Feb 2007
    Posts
    513
    Plugin Contributions
    2

    Default Re: moving sidebar modules to header

    you got the first part right;

    I put something like this in my tpl_header.php
    Code:
    <?php require(DIR_WS_MODULES . 'sideboxes/manufacturer_info.php'); ?>
    but then you also need to create this file for it to be able to be displayed;

    create file:
    includes/extra_configures/custom_config.php

    PHP Code:
    <?php $column_box_default='tpl_box_default_left.php';?>
    That should fix it it worked for me

    PHP Code:
     <?php require(DIR_WS_MODULES 'sideboxes/theme156/categories_css.php'); ?>
    Attached Files Attached Files

 

 

Similar Threads

  1. v139h Moving Home Link to Sidebar
    By stevenw1956 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Mar 2012, 02:58 PM
  2. Sidebar in Admin->Modules->Payment not displaying
    By tatrizi in forum General Questions
    Replies: 2
    Last Post: 25 Feb 2010, 09:01 PM
  3. Moving Category sidebar outside of main wrapper
    By jill8026 in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 13 Jul 2009, 11:02 PM
  4. Moving links from Sidebar to Header
    By noruga in forum Basic Configuration
    Replies: 1
    Last Post: 7 Jun 2009, 11:58 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