Posted on: 01/23/08 07:33am
By: deepak1155
Hi to all
I am using geeklog 1.4.1 , I want to include a HTML file in the HEADER.THTML. I have tried normal way like <!--#include file="abc1.html"--> , but it is not working. Please help me how to include a file.
Thank you all
Re: How to include HTML file in THTML file
Posted on: 01/23/08 02:15pm
By: Dirk
The "normal way" is called Server Side Includes (aka SHTML) and doesn't work within Geeklog.
You can, however, use PHP in header.thtml (and only in header.thtml). Try this:
Text Formatted Code
<?php echo file_get_contents("{layout_url}/blah.html"); ?>
(assuming "blah.html" is in your theme's directory).
bye, Dirk
Re: How to include HTML file in THTML file
Posted on: 02/17/08 08:06pm
By: Anonymous (Adam Moro)
How would this be accomplished in the footer (as you said, using php outside of the header isn't possible)? I'm trying to include my template files in the footer but nothing seems to work. Thanks in advance! btw, love Geeklog! It's simply awesome.
Re: How to include HTML file in THTML file
Posted on: 02/18/08 04:05am
By: Dirk
As I said, header.thtml is the only template file where PHP code can be used.
Not sure what you're trying to do. footer.thtml is a template file, so why would you want to include another template into that template?
bye, Dirk
Re: How to include HTML file in THTML file
Posted on: 02/18/08 12:35pm
By: Anonymous (Adam Moro)
I understand that. To put it as simply as I can, I'm trying to make the GL install fit inside my site's theme. I'm achieving this currently with an iframe and some js to break out of the iframe (for links that point to the index of the GL directory). What I'd like to do is simply include my template files in the Geeklog template files. Please let me know if my question is still unclear and I'll see if I can get some help with the terminology to better ask what I'm asking. Thanks again!
Adam
Re: How to include HTML file in THTML file
Posted on: 02/18/08 03:52pm
By: Dirk
Yeah, I understand what you're asking now. Your options are:
- Copy what you need from your site's theme into Geeklog's footer.thtml (thus duplicating things and making updates a pain).
- Write a replacement function for COM_siteFooter. There's actually a hook in Geeklog for that: The function needs to be called (themename)_siteFooter, e.g. professional_siteFooter() for the Professional theme.
Depending on you PHP knowledge, this shouldn't be too hard. You can copy most of the code from COM_siteFooter and then add whatever you need to include the template from your "other" theme.
bye, Dirk
Re: How to include HTML file in THTML file
Posted on: 02/18/08 07:27pm
By: Anonymous (Adam Moro)
Thanks Dirk. That helps a lot.