Hi Nick,
I found the solution. Thanks for your reply though. Basically, what I wanted
to do was simple :
the admin of my program can decided wether they want a feature on or off.
Now, depending on that, a lil section of the html would change. Using
phplib, I have seperated all my html from the php. The problem comes up,
when the html changes dependin on wether the feature is on or off. How does
one alter the html content in the template file? one cant...

The solution I found is, add a open comment tag above and and close comment
tag under the dynamic html code... commenting it out depending on wether the
feature is on or off...simple eh? :)

Regards,
Kunal Jhunjhunwala
----- Original Message -----
From: "Nick Wilson" <[EMAIL PROTECTED]>
To: "php-list" <[EMAIL PROTECTED]>
Sent: Saturday, January 26, 2002 9:20 PM
Subject: Re: [PHP] phplib


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> * and then Kunal Jhunjhunwala blurted....
> > hey... im tryint to lay some conditions for the html output... example :
> > if ($check  == 1) {
> > <some html>
> >                             }
> > else {
> >     <some other html>
> >     }
> >
> > The problem here is, I want the html in both cases to be customisable by
the
> > user... so I would have to make it a part of the template file... and if
i
> > do that, even if the conditions fail, the html will show up..any ideas
on a
> > fix for this?
>
> I'm not 100% certain I understand your Q. but how about this:
> I take it from the subject you are using a PHPLib template so if you
> were to have a teplate var called {htmlOutput} you could do this,
>
> if($check=1) {
>     $htmlOutput=<<<EOF
>     <your html here>
>     EOF;
> } elseif($check=2) {
>     $htmlOutput=<<<EOF
>     <your altenate html here>
>     EOF;
> } else {
>     $htmlOutput=<<<EOF
>     <your default html here>
>     EOF;
> }
>
> and then in your template code.....
>
> $t->set_var("htmlOutput", $htmlOutput);
>
> Hope that's what you mean
> - --
>
> Nick Wilson
>
> Tel: +45 3325 0688
> Fax: +45 3325 0677
> Web: www.explodingnet.com
>
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8UtA5HpvrrTa6L5oRAr/TAJ0RBC3OzWQashl7fFc0e9wcrow6LgCdFjY1
> xjqg6qEwLRKI+R4g0NWYRoM=
> =haum
> -----END PGP SIGNATURE-----
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to