By: Jorge
Date: 2004-02-19
Time: 19:04
|
relative to "prev & next page display when there's no result"
trying to see where it doesn't work, i've done some tests
using templates and sub templates.
Here are de codes:
main.php
<?
include_once("../classes/tbs.php") ;
$data_b = 'LASTNAME';
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('main.htm') ;
$TBS->Show() ;
?>
|
main.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>TinyButStrong</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="tbs_fr_exemples_0styles.css" rel="stylesheet" type="text/css">
</head>
<body>
<p align="center" class="title-page">Data_a value on MAIN-template is: [var.data_b]</p>
<table width="500" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td valign="top">
[tbs_include.onshow;script=sub.inc.php;getob]</td>
</tr>
</table>
<br>
<div align="center"></div>
</body>
</html>
|
sub.inc.php
<?
include_once("../classes/tbs.php") ;
$data_a = 'firstname';
$TBS = new clsTinyButStrong ;
$TBS->LoadTemplate('sub.inc.htm') ;
$TBS->Render = TBS_OUTPUT ;
$TBS->Show() ;
?>
|
sub.inc.htm
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>TinyButStrong</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p align="center" class="title-page">Data_a value on sub-template is: [var.data_a]<br>
</p>
<br>
<br>
</body>
</html>
|
AS you can see...I can't write values that are defined into my subtemplate.
Where I'm I wrong? or is this a bug?
|
By: Jorge
Date: 2004-02-19
Time: 19:26
|
sub.inc.php RESULT PAGE ON NAVIGATOR
Data_a value on sub-template is: firstname
|
By: Jorge
Date: 2004-02-19
Time: 19:28
|
main.php RESULT PAGE ON NAVIGATOR
Data_a value on MAIN-template is: LASTNAME
TinyButStrong Error (Merge Php Var): Can't merge [var.data_a] because there is no corresponding PHP variable. This message can be cancelled using the 'noerr' parameter.
Data_a value on sub-template is: [var.data_a]
|
By: Jorge
Date: 2004-02-23
Time: 01:19
|
Re: main.php RESULT PAGE ON NAVIGATOR
Hi Skroll
Just to know if this could come from a bug, or if a misunderstood something about how to use those functions..
Did you get some time to look at it, or do you need some more information?
|
By: Skrol29
Date: 2004-02-23
Time: 10:05
|
Re: main.php RESULT PAGE ON NAVIGATOR
Hi,
The script started with parameter 'script=' is executed in a function environment and not in a global environment.
(I know this is not clear in the manual, I'm goin to have it more clear in a next version)
In your case, the variable $data_a in the sub-script 'sub.inc.php' is considered as a local variable. Then [var.data_a] is not recoknize.
You should code:
global $data_a ;
$data_a = 'firstname';
|
|
|
Posting in progress.
Please wait...
|