Jump to content
Sign in to follow this  
spieh

Category Tab ver1.3 + STS templating

Recommended Posts

My goal is to have basically a 1-row, multiple-column table where I can list each category in its own <TD> tag so i can space them out horizontally across the top of my page instead of all in a small infobox on one of the side columns.

 

Checking the contribution section I found a contribution called Category Tabs ver 1.3 which when I installed it, intially it did nothing. Upon further inspection I discovered that the STS template system was taking precidence over the page. Any changes I made to header.php were not displaying on the page at all because they were not in the Sts_template.html. I edited the sts_display_output.php to disable the STS template so it would load the non-templated data & voila the Category Tabs were there now.

 

So my question would be, how can I get the two Contributions to work in conjunction with eachother?

 

-Dave

Share this post


Link to post
Share on other sites

I had trouble with those 2 contributions (STS and Category Tabs with Subs) running together back when I started out in osCommerce.

 

Rather than trying to find the solution (which there probably was one) I decided to go with BTS and Category Tabs with Subs.

Share this post


Link to post
Share on other sites

I have cat tabs working with STS. No time now, but I'll post the solution later in case you want to try.


They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. ~ Benjamin Franklin, 1759. տլ

Share this post


Link to post
Share on other sites

OK after doing some thinking I believe I have solved the issue:

 

Category Tabs 1.3 adds category_tabs.php to your /includes folder. Well since STS captures the output of php & stores the output into a variable name you have to add a couple lines to any new file you wish to capture the output from.

 

In order to capture the Category Tabs you add

"

// STS: ADD

// Capture text between category_tabs.php and header.php

require(STS_START_CAPTURE);

// STS: EOADD

"

inside of your category_tabs.php file. Adding these lines of code will actually populate the "$headcontent" variable with your tabs info.

 

Now to just modify the CSS to my liking :)

Share this post


Link to post
Share on other sites

Hmmm... You did it differently than I did. I added a new "block" to sts_user_code.php:

 

$sts_block_name = 'cat_tabs';
require(STS_START_CAPTURE);
require(DIR_WS_BOXES . 'categories_tab.php');
require(STS_STOP_CAPTURE);
$template['cat_tabs'] = strip_unwanted_tags($sts_block['cat_tabs'], 'cat_tabs');

 

then called it in sts_template.html:

 

<!-- Begin Category Tabs Mod -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="TabsSides">
?<tr class="TabsNavigation"> 
? ?<td align="center" valign="bottom" nowrap class="TabsSides">$cat_tabs</td>
?</tr>
</table>
<!-- End Category Tabs Mod -->

 

I didn't have to change any of the other files to get it to work (except for adding some style changes to make it look like I wanted).

Edited by Mary B.

They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. ~ Benjamin Franklin, 1759. տլ

Share this post


Link to post
Share on other sites
I had trouble with those 2 contributions (STS and Category Tabs with Subs) running together back when I started out in osCommerce.

 

Rather than trying to find the solution (which there probably was one) I decided to go with BTS and Category Tabs with Subs.

 

How did you get the category Tabs with Subs contrib. working with BTS? I think I'm looking into this too hard as I can't seem to figure out where to add the header code??

 

Hope you can help

Edited by Nefermet

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×