Date: 12/13/00
- Next message: Ronny Moreas: "[phplib] PHPLIB and PHP4"
- Previous message: Jan Kneschke: "Re: [phplib] LDAP and Phplib Setup"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi all,
I have just started using template class function from phplib. There are
a few things I can't quite figure out and I would appreciate some help on
it.
1. The syntax for writing the variables within a template is
{variable_name}. The problem is that I use stylesheets and the syntax for
describing the properties is also using the same curly brackets, e.g.
a:active { color: #dddddd; }. Its not a problem if the template unknown
parameter is set to "keep". But if you set it to "remove" or "comment" then
all
hell breaks loose. Any way around this proble?
2. I have figured out how to include the contents of an external file as
the value for a particular variable. The only problem is that sometimes, the
file actually contains a php script. When the file is parsed to the
template,
the script is not actually executed. The way i have gotten around that
problem is by actually saving the result of that external script to a
variable and including the file in the template script.
So the contents of the external file would be something like this:
<?
$strg = "Some Value" . $some_variable . "more values" .
$more_variables;
?>
The contents of the template script would be like this:
<?
include("some/external/script.php");
$t->set_var("VARIABLENAME", $strg);
?>
This is not the best way of doing things, could somebody please tell whether
there is a better way?
Your help would be greatly appreciated.
Many Thanks
Rishabh
---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>
- Next message: Ronny Moreas: "[phplib] PHPLIB and PHP4"
- Previous message: Jan Kneschke: "Re: [phplib] LDAP and Phplib Setup"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

