Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 09:46 pm EST
Geeklog Forums
Adding javascript to
Alain
Anonymous
Can javascript code be added to a .thtml file or only to header.thtml ?
How could I use a different template file to display static page. I modified some code so that when a staticpage title begins with \"!None\" no title at all is displayed on the page.
But with some themes there is still a background color or a line, etc ...
Is there a way to specify to use another template than \"blockheader.thtml\" to display the title of a staticpage.
Thanks
Alain
5
9
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Alain: Can javascript code be added to a .thtml file or only to header.thtml ?
You can use it in the same places as in a \"normal\" HTML file.
Quote by Alain:How could I use a different template file to display static page.
Not possible without code changes, I\'m afraid.
Quote by Alain:Is there a way to specify to use another template than \"blockheader.thtml\" to display the title of a staticpage.
If you look up how function COM_startBlock
works (in lib-common.php), you\'ll notice that it takes the name of a template file as the third parameter. So you could hack your staticpages/index.php to call COM_startBlock
with your own blockheader template file.
For other blocks, there are hooks built in to Geeklog that let you override the template from the theme, but not for static pages. You may want to submit this as a feature request ...
bye, Dirk
6
4
Quote
Alain
Anonymous
As usual ... I followed your instructions and ...
After 5 minutes it works exactly as I wanted.
I just added a COM_startBlock_sp function in lib-common.php and created a new boclkheader2.thtml file. After a modification in \"function.inc\" it works exactly as I wanted it to.
Thanks,
Alain
7
7
Quote
All times are EST. The time is now 09:46 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