skip to Main Content

I am trying to explore STS template system.

What i need to do is simple.

I just want to show a banner/box in the right column which is added from the OSC admin.

I have done the following steps:

  1. added a banner from admin banner manager.
  2. created a file in the includes/boxes directory under name customBanner.php
  3. added this line in column_right.php include(DIR_WS_BOXES . ‘customBanner.php’);
  4. And finally added the following code to customBanner.php

<?php
if ($banner = tep_banner_exists('dynamic', '170x158')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
<?php
}
?>

This code is basically used for OSC without STS template.

Now i need to know how STS template giving output in php.html files e.g.<td>$specialbox</td>. I mean how this variable is getting value from the sts.
and how can i show advertisement box in the right column.

2

Answers


  1. You should add to the includes/modules/sts_inc/sts_user_code.php teh following code:

    $sts->start_capture();
    include(DIR_WS_INCLUDES . 'boxes/customBanner.php');
    $sts->stop_capture('specialbox');
    

    It also posible to use your own file to add this code but you should include its name in the admin->modules-> Default -> Files for normal template

    Login or Signup to reply.
  2. You could add as many boxes as you like in the same way:

    $sts->start_capture();
    include(DIR_WS_INCLUDES . 'boxes/customBanner.php');
    $sts->stop_capture('box1');
    
    $sts->start_capture();
    include(DIR_WS_INCLUDES . 'boxes/OTHERcustomBanner.php');
    $sts->stop_capture('box2');
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search