Welcome to Geeklog, Anonymous Monday, December 30 2024 @ 12:36 pm EST
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);
4
8
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
7
5
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*
9
7
Quote
All times are EST. The time is now 12:36 pm.
- 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