Categories > TinyButStrong general >

Parsing multiple blocks on my index page

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Trent
Date: 2005-04-03
Time: 00:30

Parsing multiple blocks on my index page

Okay, here's the problem I'm having.  I want to include different data sets on my index page.  For example I want to have my news topics and latest blog topics posted.  I can get both to work separately using the code below for separate pages, but I want to combine them both on the same page.

This block is my news data (news.php)
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('templates/news.tpl') ;
$TBS->MergeBlock('news',$xcm,'SELECT * FROM '. NEWS .'') ;
mysql_close($xcm) ;
$TBS->Show() ;

This block would be my latest blog posts (blog.php
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('templates/rec_blog.tpl') ;
$TBS->MergeBlock('blog',$xcm,'SELECT * FROM '. BLOGS .'') ;
mysql_close($xcm) ;
$TBS->Show() ;

If I try to use includes on my index page like in the example below, I only get the data from the first class displayed. 

include('news.php');
include('blog.php');

How would I use the template class to show both of these and possibly one other content area on my index page?
By: Trent
Date: 2005-04-03
Time: 03:36

Re: Parsing multiple blocks on my index page

I found my answer with the last post made by Skrol in the 2 selects dependents topic.