I found in the forum the way how to use pagetitle etc.
http://www.phpwcms.de/forum/viewtopic.php?t=13841
So with $GLOBALS['content']["cat_name"]; it's possible to get the category. Fine. However I try to get the name of the category above the actual level.
Example:
Level0->Level1->Level2->Level3
I'm on Level3 and try to get the name of Level2.
Looking into the db I see that I could use table phpwcms_articlecat since there is the field acat_struct which actually contains the parent category but I'm not sure how to access this data - probably there is a simple solution?
(As you can see I just start with MySQL and PHP and phpwcms
Cheers Beppo
How to get the actual category
- marcus@localhorst
- Posts: 815
- Joined: Fri 28. May 2004, 11:31
- Location: localhorst
- Contact:
hi,
write print_r($GLOBALS) in your script, and you will get all available data (Titel, IDs etc.) and information about naviagtion structure ($LEVEL_ID).
You know how to read an array/structure tree?
i have someting like this in mind (the structure maybe wrong $LEVEL_ID is important - it is replaced with the right cat id in structure)
$GLOBALS['content'][$LEVEL_ID[2]]["cat_name"]
grüße
marcus
write print_r($GLOBALS) in your script, and you will get all available data (Titel, IDs etc.) and information about naviagtion structure ($LEVEL_ID).
You know how to read an array/structure tree?
i have someting like this in mind (the structure maybe wrong $LEVEL_ID is important - it is replaced with the right cat id in structure)
$GLOBALS['content'][$LEVEL_ID[2]]["cat_name"]
grüße
marcus