Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.

Styling Infoboxes

  • Since osCmax uses BTS (Basic Templating System) you can very easily style each of your infoboxes differently.
  • You may find this useful if you are creating your own infoboxes, for example the social media infobox created in this example.
  1. Simply open boxes.tpl.php from catalog/templates/{your_template}/boxes/box.tpl.php and save as social.tpl.php (assuming you are following the example given in the link above - otherwise name the file the same as variable you defined in the infobox - $box_base_name)
  2. Now this new file will be used by the system to style the surrounding box for the content created in the file stored in catalog/includes/boxes/social.php

Worked example - perhaps you don't want a header and no border:

Make social.tpl.php (in catalog/templates/{your_template}/boxes)

<?php
/*
$Id: social.tpl.php $

  osCmax e-Commerce
  http://www.osCmax.com

  Copyright 2000 - 2012 osCmax

  Released under the GNU General Public License
*/


    if (!defined ('DIR_FS_CATALOG')) die ("Access denied.");
    /* infobox template  */ 
?>
          <tr>
            <td>
              <table border="0" width="100%" cellspacing="0" cellpadding="0">
                <tr>
                  <td>
                    <table border="0" width="100%" cellspacing="0" cellpadding="3">
                      <tr>
                        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?></td>
                      </tr>
                      <tr>
                        <td class="boxText"<?php if (isset($boxContent_attributes)) echo $boxContent_attributes; ?>><?php echo $boxContent; ?></td>
                      </tr>
                      <tr>
                        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?></td>
                      </tr>
                    </table>
                  </td>
                </tr>
              </table>
            </td>
          </tr>
  • Obviously you can take this much further by simply apply your own styles to this new template file and adding the new classes to catalog/templates/{your_template}/stylesheet.css.
  • It is always best to start with box.tpl.php and edit from there.
  • Hopefully this shows you clearly how flexible osCmax is to your requirements.
  • Bookmark at
  • Bookmark "Styling Infoboxes" at Digg
  • Bookmark "Styling Infoboxes" at Furl
  • Bookmark "Styling Infoboxes" at Reddit
  • Bookmark "Styling Infoboxes" at Google
  • Bookmark "Styling Infoboxes" at StumbleUpon
  • Bookmark "Styling Infoboxes" at Technorati
  • Bookmark "Styling Infoboxes" at Facebook
  • Bookmark "Styling Infoboxes" at Twitter
  • Bookmark "Styling Infoboxes" at Slashdot
v2.5/styling_infoboxes.txt ยท Last modified: 2012/03/12 16:39 by pgmarshall
You are here: startv2.5styling_infoboxes
Dieses Dokuwiki verwendet ein von Anymorphic Webdesign erstelltes Thema.
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0