#6 PHPLib: Templates with several pages

closed
nobody
8
2002-08-04
2002-03-05
No

Hello.
I`m a newbie in programming php, so please help me
even my question may be very stupid :)
I`d like to use the templates from the phplib for my
webpage. I understood the example in the manual, so my
test page runs. But my problem is, that I defined the
title and the content once in an array. But if the
user will see another content, I have to redefine the
content and the title (in effect, I have to redefine
the array
$t->set_var(array("Title" => "Dies ist der Titel der
Page", "BodyContend" => "Dies ist der Body
Inhalt."));). But how can I implement this?
I`d like a solution with several files wich contens
the title and the content for each page.
How can I do that?

PS: Please excuse my bad english, I normaly talk
Swissgerman...

Discussion

  • Dominic Suter

    Dominic Suter - 2002-03-05
    • labels: --> Install Problem (example)
    • summary: TEmplates mit mehrern Seiten --> PHPLib: Templates with several pages
     
  • Dominic Suter

    Dominic Suter - 2002-03-05
    • priority: 5 --> 8
     
  • Ignatius Teo

    Ignatius Teo - 2002-08-04

    Logged In: YES
    user_id=29397

    What about using a variable to hold the content?
    You can try this:

    $t->set_var(array(
    "Title" => $title, // or even this
    "Content" => ($user=='joe' ? $content1 : $content2)
    ));

     
  • Ignatius Teo

    Ignatius Teo - 2002-08-04
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks