From: Ton O. <ton...@he...> - 2005-01-20 20:11:27
|
The example is more like a sort of Proof-of-concept. You have to change a few things to make it work for your situation. Here is what it does. First it gets the id of the current page. Then it gets the category_id (!! so not the category name!!) of the current page by calling the fatcat function getElementCatId. The case"3" and case"4" refer to this category id. So if you created the categories category_1 and category_2 you have to lookup the corresponding id's of these categories in the mod_fatcat_categories. regards, Ton Oosterhoff. -----Oorspronkelijk bericht----- Van: php...@li... [mailto:php...@li...] Namens yawstick Verzonden: woensdag 19 januari 2005 23:53 Aan: php...@li... Onderwerp: Re: [Phpwebsite-developers] formating amd themes Thanks for your help I've been playing with your example but have not been able to get it to work. I have the following in the thempe.php from your example. $THEME["EXAMPLE"] = $_SESSION['OBJ_user']->isUser() ; $THEME["user"] = $_SESSION["SES_PM_page"]->id ; $THEME["category"] = $_SESSION["OBJ_fatcat"]->getElementCatId($my_pageid) ; // get the page id: $my_pageid = $_SESSION["SES_PM_page"]->id; // get the category of this page: $my_category = $_SESSION["OBJ_fatcat"]->getElementCatId($my_pageid); switch ($my_category){ case "3": $my_style = "page1.css"; break; case "4": $my_style = "page2.css"; break; default: $my_style = "style.css"; } // output it to the template... $THEME["my_style"] = $my_style; I added some things trying to trouble shoot it. The category seems to be coming back empty even though I have added several categories and set them in the page. The case "3" and case "4" are from examining the data in the mod_catcat_catgegories table. Where would you find the variables like $_SESSION["OBJ_fatcat"]->getElementCatId($my_pageid) Thanks Paul ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Phpwebsite-developers mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers |