GT Mod and navigation/menu

If you've problems with unsupported - non official ;-) - functionalities use this forum please.
shocktone
Posts: 74
Joined: Thu 19. Aug 2004, 17:33
Location: Duesseldorf. Germany

GT Mod and navigation/menu

Post 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!
User avatar
isac
Posts: 410
Joined: Tue 18. Nov 2003, 13:13
Location: Portugal
Contact:

Post by isac »

you could try in conf.template_default.inc.php in

Code: Select all

// row based navigation
shocktone
Posts: 74
Joined: Thu 19. Aug 2004, 17:33
Location: Duesseldorf. Germany

Post by shocktone »

Mhh. I looked at this location before. But I still dont know what to do...
User avatar
isac
Posts: 410
Joined: Tue 18. Nov 2003, 13:13
Location: Portugal
Contact:

Post 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>';
shocktone
Posts: 74
Joined: Thu 19. Aug 2004, 17:33
Location: Duesseldorf. Germany

Post 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
User avatar
isac
Posts: 410
Joined: Tue 18. Nov 2003, 13:13
Location: Portugal
Contact:

Post by isac »

Keep it simple. try one of this menus

http://css.maxdesign.com.au/listamatic/horizontal01.htm
shocktone
Posts: 74
Joined: Thu 19. Aug 2004, 17:33
Location: Duesseldorf. Germany

Post 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.
User avatar
isac
Posts: 410
Joined: Tue 18. Nov 2003, 13:13
Location: Portugal
Contact:

Post by isac »

You can always put your custom menu in external file and them include via {PHP:mymenu.html}.

Good luck
shocktone
Posts: 74
Joined: Thu 19. Aug 2004, 17:33
Location: Duesseldorf. Germany

Post by shocktone »

thanks isac.
do you have an example ?

thanks alot.
greetings Jens.
User avatar
isac
Posts: 410
Joined: Tue 18. Nov 2003, 13:13
Location: Portugal
Contact:

Post by isac »

Can you mail me an example of you are traying to do? Would be much easier :wink:

as1528734@sapo.pt
bebernl
Posts: 15
Joined: Wed 24. Mar 2004, 15:53
Location: Amsterdam

Small example

Post 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
Last edited by bebernl on Thu 2. Dec 2004, 16:31, edited 1 time in total.
brans

Post by brans »

and could give us an example where you used this code ?
bebernl
Posts: 15
Joined: Wed 24. Mar 2004, 15:53
Location: Amsterdam

Post by bebernl »

sure

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


but this page is under development.
brans

Post by brans »

thanks :-D
frold
Posts: 2151
Joined: Tue 25. Nov 2003, 22:42

Post 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
http://www.studmed.dk Portal for doctors and medical students in Denmark
Post Reply