Date: 07/25/01
- Next message: Richard Archer: "Re: [phplib] Template Bug"
- Previous message: nathan r. hruby: "Re: [phplib] redeclare page_open()"
- Next in thread: Richard Archer: "Re: [phplib] Template Bug"
- Reply: Richard Archer: "Re: [phplib] Template Bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm still fairly new to phplib but have been using it on a few sites
without any real problems.
I have some pages built up from four templates: a header, a footer, a nav
bar and the body of the page. Most variables are filled in properly but
I've found that the links aren't being set up as I expect. I've tried
stripping things down to their bare minimum and have included below a
script and a template which I think should work but for some reason don't.
Am I doing something wrong or is there a bug I'm not aware of?
cheers. James.
---- SCRIPT test.php ----
<?php
require('prepend.php');
page_open(array("sess"=>"R3Sess"));
$tpl = new Template("/home/room3/templates");
$tpl->set_file(array(
"nav" => "the_festival/nav.html",
));
$tpl->set_var(array(
"FESTIVAL" => $sess->url('/the_festival/'),
"RECORDS_LINK" => $sess->url('/records/'),
"SOUND_LINK" => $sess->url('/live_sound/'),
"MANAGEMENT_LINK" => $sess->url('/management/'),
"CONTACT_LINK" => $sess->url('/contact_us.php'),
"STAGING_LINK" => $sess->url('/staging/'),
"ABOUT_LINK" => $sess->url('/about_us.php'),
"LINKS_LINK" => $sess->url('/links.php'),
"HOME_LINK" => $sess->url('/')
));
$tpl->parse("navigate", "nav");
$tpl->p("nav");
page_close();
?>
---- TEMPLATE nav.html ----
<!-- BEGIN festival_nav template -->
<p><a href="{FESTIVAL}">Festival</a>
<p><a href="{RECORDS_LINK}">Records</a>
<p><a href="{SOUND_LINK}">Sound</a>
<p><a href="{MANAGEMENT_LINK}">Management</a>
<p><a href="{STAGING_LINK}">Staging</a>
-- Abbestellen mit Mail an: phplib-unsubscribe <email protected> Kommandoliste mit Mail an: phplib-help <email protected>
- Next message: Richard Archer: "Re: [phplib] Template Bug"
- Previous message: nathan r. hruby: "Re: [phplib] redeclare page_open()"
- Next in thread: Richard Archer: "Re: [phplib] Template Bug"
- Reply: Richard Archer: "Re: [phplib] Template Bug"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

