Welcome to Geeklog, Anonymous Friday, October 18 2024 @ 04:31 am EDT

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
 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
 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
 Quote

All times are EDT. The time is now 04:31 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