Categories > TinyButStrong general >

TBS and Frames

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: AllRound
Date: 2005-05-26
Time: 18:03

TBS and Frames

I checked the forum example, but I can't get TBS to work with frames. I have a template frameset file and a template file for each frame. Now how can I get the variables into a certain frame instead of in the frameset page?

I can't get this to work, can someone maybe give me a small example?

Thanks!
By: Skrol29
Date: 2005-05-26
Time: 19:35

Re: TBS and Frames

Hello AllRound,

This forum works with TBS+Frames. The source is available at the download page.
By: AllRound
Date: 2005-05-26
Time: 23:25

Re: TBS and Frames

I did check the source, but I just don't get how it works... that's why I was wondering if there's an easier example?
By: Skrol29
Date: 2005-05-27
Time: 01:00

Re: TBS and Frames

Ok, sorry.

The forum uses only one php script for displaying all pages of all frames. That's a way of programming I often use.
The page to display in each frame is determined by a variable passed on the URL.

example :
  my_app.php?frm=menuleft => display the page with menu on the left
  my_app.php?frm=menutop => display the page with menu on top
  my_app.php => display the page with frameset

So in your my_app.php script, you just have to retrieve the 'frm' variable and proceed to the corresponding merge for the page.
example:
  $frm = (isset($_GET['frm'])) ? $_GET['frm'] : '' ;
  if ($frm=='menuleft') {
    $TBS->LoadTemplate('menuleft.htm');
    ...
    $TBS->Show();
  }
  if ($frm=='menuleft') {
    $TBS->LoadTemplate('menutop.htm');
    ...
    $TBS->Show();
  }
  if ($frm=='') {
    $TBS->LoadTemplate('frameset.htm');
    ...
    $TBS->Show();
  }
By: RwD
Date: 2005-05-27
Time: 09:25

Re: TBS and Frames

AllRound,
Also keep in mind that in a frame there is nothing more then a webpage. Meaning you should manage pages in there as if they where a standalone page. You can ofcourse send variables from one frame to another but you could also do this between browser windows anyway...

[offtopic]
Bèr?
[/offtopic]
By: AllRound
Date: 2005-05-27
Time: 14:45

Re: TBS and Frames

It works now, I misunderstood the example. Thanks Skrol29 and "Ruudt?" for your help!
By: RwD
Date: 2005-05-27
Time: 21:10

Re: TBS and Frames

[offtopic]Yes, but you missed the umaut on the second b :P