osCmax v2.5 User Manual
Results 1 to 5 of 5

include Infoboxes anywhere ?

This is a discussion on include Infoboxes anywhere ? within the osCmax v2 Customization/Mods forums, part of the osCmax v2.0 Forums category; I have tried searching the forums/google for infobox related help but no luck. Sorry, if I've missed a post something ...

      
  1. #1
    ITF
    ITF is offline
    New Member
    Join Date
    Aug 2010
    Posts
    17
    Rep Power
    0


    Default include Infoboxes anywhere ?

    I have tried searching the forums/google for infobox related help but no luck. Sorry, if I've missed a post something similar to this.

    Right now I understand that all infoboxes take the styles from templates/name/boxes/box.tpl.php

    I was wondering how to take one specific info box, change its style and place it somewhere else on the template besides just left/right in the box.tpl.php

    For example say in the templates/name/boxes/ folder I make a searchbox.tpl.php
    Then in the main_page.tpl.php do an include()..
    Or is there an oscmax function/object already created for such placements? <? INFOBOX_SEARCH ?> (something like that)

    How/what do I need to use in the template files in order to place an infobox anywhere on the layout? Like say putting the search in the header or the languages infobox in the footer?

    Thanks

  2. #2
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: include Infoboxes anywhere ?

    You can move the code you need out of the infobox and into the header/footer by simply moving the code into main_page.tpl.php.

    See my demo for examples of search in header etc.

    Regards,
    pgmarshall
    _______________________________

  3. #3
    ITF
    ITF is offline
    New Member
    Join Date
    Aug 2010
    Posts
    17
    Rep Power
    0


    Default Re: include Infoboxes anywhere ?

    Great!!! Thanks pgmarshall, that was a great direction to go in!!
    Works great, less code.

    I made a new file /includes/boxes/searchbox.php (from original search.php)
    made a new /templates/name/boxes/searchbox.tpl.php

    Changed the $box_base_name
    Code:
    $box_base_name = 'searchbox';
    (I suppose I didn't need to change that name.. and instead just needed to create a search.tpl.php (instead of 'searchbox')

    Then added this somewhere in main_page.tpl.php

    Code:
    require(DIR_WS_INCLUDES . 'boxes/searchbox.php');
    Worked great! custom template searchbox anywhere on the frontend design layout.

    Thanks for pointing that out to me!

  4. #4
    osCMax Development Team
    pgmarshall's Avatar
    Join Date
    Feb 2009
    Location
    London
    Posts
    2,678
    Rep Power
    49


    Default Re: include Infoboxes anywhere ?

    Glad it worked for you.

    Might be worth taking a look at the fallback-html template in v2.1 which basically does the same with HTML markers to place the php code within the template.

    Regards,
    pgmarshall
    _______________________________

  5. #5
    ITF
    ITF is offline
    New Member
    Join Date
    Aug 2010
    Posts
    17
    Rep Power
    0


    Default Re: include Infoboxes anywhere ?

    Thanks pgmarshall, will have a look into that.

    I have an installation of oscmax 2.2 installed to compare with v2.0. Trying to understand the system. Right now, pretty much understand most of the design/template code. Hopefully to work on some modules next.

Similar Threads

  1. Adding PHP include to Info Box
    By Marotta1 in forum osCmax v2 Customization/Mods
    Replies: 10
    Last Post: 08-02-2010, 06:44 AM
  2. How to show net Prices include tax?
    By allitsolutions in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 01-21-2010, 01:58 PM
  3. Error From Include
    By ddigitally in forum osCommerce 2.2 Modification Help
    Replies: 2
    Last Post: 06-02-2007, 06:30 PM
  4. Please include Spanish support in MS2 MAX!!!!!!!!!!!!
    By isifra in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 11-21-2004, 03:15 PM
  5. EMAIL_TEXT_SUBJECT How to include products_model
    By ireader in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 10-07-2004, 04:21 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
  •