Page 1 of 2

GT Mod and navigation/menu

Posted: Mon 15. Nov 2004, 14:38
by shocktone
Hi guys,

the mod works fine. But something like:
{GT:stil} {NAV_ROW} {/GT} doesn't work.
Of course this makes sense.

I want to do use GT MOD so I can use the fonts I like for the navigation.

Any ideas ? Thanks alot for your help!

Posted: Mon 15. Nov 2004, 15:04
by isac
you could try in conf.template_default.inc.php in

Code: Select all

// row based navigation

Posted: Mon 15. Nov 2004, 15:09
by shocktone
Mhh. I looked at this location before. But I still dont know what to do...

Posted: Mon 15. Nov 2004, 15:23
by isac
ok, Your right!

You have to edit front.func.inc.php around line 739 and change this line

Code: Select all

		$nav .= '">'.html_specialchars($GLOBALS['content']['struct'][$act_cat_id]['acat_name']).'</a>';
to

Code: Select all

		$nav .= '">{GT:stil}'.html_specialchars($GLOBALS['content']['struct'][$act_cat_id]['acat_name']).'{/GT}</a>';

Posted: Mon 15. Nov 2004, 15:38
by shocktone
Wow. That works a little bit already. But it only works for the first navigation item. The others remain the same. The other problem would be, that would need over/on status also.
Is it a maybe a better idea to write the whole menue in CSS (incl. pics) and than link to the pages ? Than its not really a CMS anymore.
mhhh

Posted: Mon 15. Nov 2004, 15:48
by isac
Keep it simple. try one of this menus

http://css.maxdesign.com.au/listamatic/horizontal01.htm

Posted: Mon 15. Nov 2004, 15:57
by shocktone
Ok thanks. I know how to program css menus with BG pictures. I also tried that with a similar system as GT. And it works. So I will do it all by myself in the template file

Than I make the connection to PHPWCMS with the NAV_TABLE_COLUMN:integer ? for example.
But if I add a new nav item I have to edit the template ?

Of course the other solution would be more elegant and quicker if it would work.
Thanks alot.

Posted: Mon 15. Nov 2004, 16:06
by isac
You can always put your custom menu in external file and them include via {PHP:mymenu.html}.

Good luck

Posted: Mon 15. Nov 2004, 16:07
by shocktone
thanks isac.
do you have an example ?

thanks alot.
greetings Jens.

Posted: Mon 15. Nov 2004, 16:11
by isac
Can you mail me an example of you are traying to do? Would be much easier :wink:

as1528734@sapo.pt

Small example

Posted: Thu 2. Dec 2004, 14:06
by bebernl
Hi there,

i made the following and it works fine by me.

in the file front.func.inc.php (at \include\inc_front) go to line 778 ( in my version (Release 1.1-RC4 27-08-2004_A) there are 4 lines before, which are outcommented) and insert the complete following code in line 778:

Code: Select all

			if($GLOBALS['content']["cat_id"] == $key || isset($breadcrumb[$key])) {
				$nav .= '{GT:rownavmenuactive}';
			} else {
				$nav .= '{GT:rownavmenu}';
			}
Below the inserted Text you see this code:

Code: Select all

			$nav .= ''.html_specialchars($GLOBALS['content']['struct'][$key]['acat_name']).'</a>';
			$nav .= $after;
Change it like this: (Just inset {/GT} before the linktag

Code: Select all

			$nav .= ''.html_specialchars($GLOBALS['content']['struct'][$key]['acat_name']).'{/GT}</a>';
			$nav .= $after;
rownavmenuactive and rownavmenu are definded GT Styles. in my case they are defined as:
rownavmenuactive
rownavmenu

If you use the {Nav_Row} tag, you will see, that active categories are in the color of rownavmenuactive now.


It should look like this now:

Code: Select all

			//$nav .= '<a href="index.php?';
			//$nav .= ($GLOBALS['content']['struct'][$key]['acat_alias']) ? 
			//html_specialchars($GLOBALS['content']['struct'][$key]['acat_alias']) : 'id='.$key.',0,0,1,0,0';
			//$nav .= '">'.
			if($GLOBALS['content']["cat_id"] == $key || isset($breadcrumb[$key])) {
				$nav .= '{GT:rownavmenuactive}';
			} else {
				$nav .= '{GT:rownavmenu}';
			}

			$nav .= ''.html_specialchars($GLOBALS['content']['struct'][$key]['acat_name']).'{/GT}</a>';
			$nav .= $after;
		}
	}
	if($nav) {
		$nav  = $GLOBALS['template_default']["nav_row"]["before"].$nav;
		$nav .= $GLOBALS['template_default']["nav_row"]["after"];
	}
	return $nav;
}

// -------------------------------------------------------------
So it should look:
Image
The Red is the actual category where i was.

I hope it is understandable :wink:

greets

Bertram


// -------------------------------------------------------------
Edited more understandable

Posted: Thu 2. Dec 2004, 15:39
by brans
and could give us an example where you used this code ?

Posted: Thu 2. Dec 2004, 15:59
by bebernl
sure

http://www.immo-koenig.de
I use it there for the Top-Menu.


but this page is under development.

Posted: Thu 2. Dec 2004, 17:19
by brans
thanks :-D

Posted: Thu 2. Dec 2004, 18:02
by frold
brans wrote:thanks :-D
Is it possible to add a mouse overeffect? So it eg. change from one background to another?

So it eg. change from
Verdenna_Transparent_style
to
Verdenna_redbackground_style