Posted on: 04/14/05 09:40am
By: ckpicker
I am trying to add the Topic Name as a header on the Topic's main page. I want it to change depending on which Topic is being viewed. Does anyone have any idea how to do this? I assume it would be in my theme's layout files somewhere, but I can't seem to find it. Thanks in advance!!
Add Topic Name as Header
Posted on: 04/14/05 09:47am
By: beewee
I believe that a topicname is a story function and cannot be used in a header function.
Add Topic Name as Header
Posted on: 04/14/05 09:52am
By: ckpicker
When I say 'header' I just mean a label I could put in the center block within H1 tags. Is that possible?
Add Topic Name as Header
Posted on: 04/14/05 12:10pm
By: beewee
Yes, it is: make a Static page with the H1 HTML code and choose the settings: place as centerblock -> on top of the page -> in the desired topic -> ready!
Add Topic Name as Header
Posted on: 04/14/05 01:44pm
By: Dirk
The topic is not currently available in header.thtml, but it should be easy to add in COM_siteHeader in lib-common.php, since it's already out into the site's title tags there.
bye, Dirk
Re: Add Topic Name as Header
Posted on: 11/19/06 02:23pm
By: tmarquez
I went ahead and did this for my site thanks to Dirk's suggestion.
in lib-common.php
go to line 899 (aproximately) where you see this code:
Text Formatted Code
$pagetitle = stripslashes( DB_getItem( $_TABLES['topics'], 'topic',
"tid = '$topic'" ));
And add something like this underneath:
Text Formatted Code
$topictitle = stripslashes( DB_getItem( $_TABLES['topics'], 'topic',
"tid = '$topic'" ));
$topictitle = 'News: ' . $topictitle;
Then a few lines down around 926 where you see:
Text Formatted Code
$header->set_var( 'background_image', $_CONF['layout_url']
. '/images/bg.' . $_IMAGE_TYPE );
And I added this above the line:
Text Formatted Code
$header->set_var ( 'topic_title', $topictitle);
Then go to your layout\header.thtml and add {topic_title} where ever you want it displayed.
NOTE: Remember to backup your files before attempting these type of edits.
Re: Add Topic Name as Header
Posted on: 07/24/07 05:45pm
By: Anonymous (SAVP)
I used to have a header with a static page on top on each category. But unfortunately after migration to Geeklog 1.4.1 (with multilingual plugin) it has been a a little bit of trouble trying to figure it out because all our "stories" are in a way already bi-lingual, so the static page or heather for each category is not displayed unless you select a category, but categories only have one language??
In other words...
I want the site work with multi-language feature for menus, home page and heathers (static pages with the name of the categories being displayed) , but not the categories. Is this possible???
I will appreciate very much for your help or guidance.
Regards to all.
Re: Add Topic Name as Header
Posted on: 07/24/07 06:45pm
By: SVP
Sorry, it is header instead of heather.