Re: an HTML_Template_IT[X] fork is available

From: Date: Tue, 11 Feb 2003 18:53:53 +0000
Subject: Re: an HTML_Template_IT[X] fork is available
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13130@lists.php.net to get a copy of this message
Hello everyone! I have one question about using HTML_Template_IT.php can IT hanle this situation? : I want to made highlighting of selected menu item.. $menu = $page->getAdminMenu($a); // $a = auth. $t->setCurrentBlock('menu_item'); foreach ($menu as $item) { if ($page->isSelected($item)) { $t->setCurrentBlock('menu_item_selected'); } $t->setVariable(array( "MENU_URL" => $item[url], "MENU_NAME" => $item[name], )); $t->parseCurrentBlock(); } template: <!-- BEGIN menu --> <!-- BEGIN menu_item --> <a href="{MENU_URL}">{MENU_NAME}</a><br> <!-- END menu_item --> <!-- BEGIN menu_item_selected --> <b><u><a href="{MENU_URL}">{MENU_NAME}</a></b></u><br> <!-- END menu_item_selected --> <!-- END menu --> In that way menu_item_selected always on bottom (after all menu items in list). I made this in this way: <!-- BEGIN menu_item --> {SELECTED_MENU_ITEM_PRE} <a href="{MENU_URL}">{MENU_NAME}</a><br> {SELECTED_MENU_ITEM_POST} <!-- END menu_item --> and $page->isSelected($item), then $t->setVariable("SELECTED_MENU_ITEM", '<b><u>'); ... and so on... But it's not very good solution, and I can't found this like situation in documentation.. Can anyone IT user or IT lead developer help me? Thank you very much. About replacing IT/ITX by proposed package: I will not vote at this time. But I think, were are many aggression about this. Alexey made his work, waste his time, and propose his work to us, and what we reply to him? "No, No, No! I decide this!". I propose to send to list, what BC-s and features we want to have in proposed package, and if it will be done, I do not see the reason to reject Alexey's proposition. If his class do same job like IT/ITX, but faster, and had more features - why not? Thank you. -- kVn http://php4you.kiev.ua/

« previous php.pear.dev (#13130) next »