Categories > TinyButStrong general >

Using TBS for existing dynamic PHP template

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Erik
Date: 2011-04-01
Time: 10:12

Using TBS for existing dynamic PHP template

I want to use TBS for my existing webpage. Right now my template is a single index.php file with following code syntax to fetch the content:
    <?
          $fileend = ".php";
          $file="{$_GET["page"]}$fileend";
          $news="news.php";
          if(file_exists($file))
            include($file);
          else
            include($news);
    ?>
When I'm using this I can access my content like: http://mydomain.com/index.php?page=news or when my files are in a subdirectory http://mydomain.com/index.php?page=subdomain/page

Now I want to do the same with TBS as I want to include the header in the title tag. But I still want to use my page.php files for the content.

How should I proceed?
By: Skrol29
Date: 2011-04-03
Time: 00:18

Re: Using TBS for existing dynamic PHP template

Hi,

Did you have a look at the sub-template example ?
http://www.tinybutstrong.com/examples.php?e=subtpl&m=result
By: Erik
Date: 2011-04-03
Time: 18:49

Re: Using TBS for existing dynamic PHP template

Hi,
Thanks, didn't found it by myself! Will take a look at it but it seems that this is what I want.