By: saibal
Date: 2014-10-17
Time: 23:22
|
problem in include order (header and footer)Hi all,
I don't understand where is my error. I have this template:
The order would be 1) header code 2) my text 3) footer code instead, when i use "script" to include dynamic php pages, the order is: 1) header 2) footer 3) my text why? Can't I use onload/script as INCLUDE in php? thanks lorenzo |
||||||
By: saibal
Date: 2014-10-18
Time: 10:33
|
Re: problem in include order (header and footer)very strange... this is the same wrong result:
and the html is:
why? |
||||||
By: Skrol29
Date: 2014-10-18
Time: 23:18
|
Re: problem in include order (header and footer)Hi,
Since TBS 3.9.0 your are supposed to use $TBS in the subtemplate script, instead of the PHP command echo. Have a look at the option "old_subtemplate": http://www.tinybutstrong.com/manual.php#php_setoption_methods_old_subtemplate |
||||||
By: saibal
Date: 2014-10-19
Time: 21:20
|
Re: problem in include order (header and footer)thank you. Could you provide a little example please? I tried the "old_subtemplate" option but it does not work. I'm sorry
|
||||||
By: Skrol29
Date: 2014-10-21
Time: 01:39
|
Re: problem in include order (header and footer)The best solution is to avoid using the echo() command in the sub-script.
Instead use the variable $TBS, just like in the inline example : http://www.tinybutstrong.com/examples.php?e=subtpl&s=login&m=php |
||||||
By: Anonymous
Date: 2014-10-24
Time: 09:28
|
Re: problem in include order (header and footer)Thank you
|
||||||
By: saibal
Date: 2014-10-24
Time: 12:31
|
Re: problem in include order (header and footer)I avoid all echo command... but the subtpl method does not work. my example is very simple... take a look:
PAGE INDEX.PHP code:
TEMPLATE INDEX code:
PAGE SUBTEMPLATE.PHP code:
PAGE subtpl.html code:
the result of all this code is that "subtpl" overwrite all html code. I expect this:
instead I have:
|
||||||
By: saibal
Date: 2014-10-24
Time: 12:33
|
Re: problem in include order (header and footer)I think in previuos version of TBS, the "include" feature was more clear and simple to implement. Now it's quite intricate
|
||||||
By: saibal
Date: 2014-10-24
Time: 13:09
|
Re: problem in include order (header and footer)finally I resolved. the problem was in this missing code (in subtpl template):
"if(isset($this)) $TBS =& $this; else $TBS = new clsTinyButStrong;" |
||||||
By: Skrol29
Date: 2014-10-27
Time: 01:56
|
Re: problem in include order (header and footer)OK
|