Bild für jede Menükategorie

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
nec
Posts: 15
Joined: Fri 26. Aug 2005, 11:14
Location: Am Bodensee

Bild für jede Menükategorie

Post by nec »

Hallo zusammen,

ich bin gerade am erstellen einer Intranetseite für unser Unternehmen. Klappt, dank phpwcms, soweit auch ganz gut :D
Ich hänge jetzt aber an einem Punkt. Und zwar hätte ich gerne über der Menüleiste ein Bild des jeweiligen Bereiches.
Also bei Finanz was anderes als bei Informatik. Gibt es da eine Möglichkeit?
Ich hab mir schon überlegt den {Breadcrumb} auszulesen und daran zu schauen wo ich mich gerade befinde.
Aber vielleicht gibt es ja noch eine bessere Lösung :wink:

Viele Grüße,
nec
rushclub
Posts: 915
Joined: Tue 17. Feb 2004, 18:52

Post by rushclub »

du kannst zum einen verschiedene templates basteln. es gab hier aber auch mal n script was je nach ebene ein anderes bild zeigt, aber frag mich nicht wo ;)

gruesse
rush
3 (!) Jahre warten reichen mir. Ich bin erst mal weg.
rushclub
Posts: 915
Joined: Tue 17. Feb 2004, 18:52

Post by rushclub »

this may help:

--...--/index.php/topic,56.0.html

cheers
rush
3 (!) Jahre warten reichen mir. Ich bin erst mal weg.
nec
Posts: 15
Joined: Fri 26. Aug 2005, 11:14
Location: Am Bodensee

Post by nec »

woohoo. Thanks rushclub.
I modified the script a little bit. Now it's working fine.
If anybody else needs something like this here is the code:

Code: Select all

[PHP]
$cur_toplevel_name = '';
$GLOBALS['nav_point_listing'] = get_breadcrumb($GLOBALS['content']["cat_id"], $GLOBALS['content']['struct']);

if(isset($GLOBALS['nav_point_listing']) && count($GLOBALS['nav_point_listing']) > 1) {
   reset($GLOBALS['nav_point_listing']);
   next($GLOBALS['nav_point_listing']);
   $cur_toplevel_name = html_specialchars($GLOBALS['content']['struct'][ 

intval(key($GLOBALS['nav_point_listing'])) ]['acat_name']);
}

...

if($cur_toplevel_name=='Finanzen / IT') $image='{IMAGE:Header/Header_FI.gif}';

if($cur_toplevel_name=='Geschäftsführung') $image='{IMAGE:Header/Header_G.gif}';

if($cur_toplevel_name=='Personalwesen') $image='{IMAGE:Header/Header_PS.gif}';

...

echo $image;
[/PHP]

regards,
nec
Post Reply