Welcome to Geeklog, Anonymous Thursday, April 25 2024 @ 04:33 am EDT

Geeklog Forums

Templates


Anonymous

Anonymous
Hi, i wanted to use templates on my website... but they hardly ever worked... is there something extra that geeklog has to parse .thtml files? I have this so far, and it never works... This my site, but it has no geeklog running on it... $header = new Template ($path); $header->set_file('header', 'header.thtml'); $header->set_var('page_title', $sitename $header->parse('out', 'header'); $output .= $header->finish($header->get_var('out')); $output .= '</main></html>'; echo($output);
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You don't say what the error is, so I can only guess ... Did you include the template class file? It's at system/classes/template.class.php The rest of your code looks okay (well, apart from that </main> tag which isn't part of HTML ;-) bye, Dirk
 Quote

Anonymous

Anonymous
Yes thanks that template.class.php was infact an important thing, i was trying to make somehting without using it tho, once i have looked inside that file, i figure it's impossible... i guess i have to give templates up *sigh*
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Where's the problem? You will either need to use an existing template class (the one that Geeklog uses is actually taken from phplib.sf.net) or you will have to roll your own ... bye, Dirk
 Quote

All times are EDT. The time is now 04:33 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content