raja9911 Posted June 9, 2007 Share Posted June 9, 2007 Hey. Im pretty new in php and making my first site I have made this code using smarty and pear.... This code is a menu system, where u can select the department and see all the sub product. I can easily display the sub product under all the department (not between), but if i want to add the subproduct between departments when a user click on it.. it doesnt work {section name=i loop=$departments_list->mDepartments} {* verify if the department is selected to decide what CSS style to use *} {if ($departments_list->mSelectedDepartment == $departments_list->mDepartments[i].department_id)} {assign var=class_d value="DepartmentSelected"} {else} {assign var=class_d value="DepartmentUnselected"} {/if} {* generate a link for a new department in the list *} <a class="{$class_d}" href="{$departments_list->mDepartments[i].onclick}"> » {$departments_list->mDepartments[i].name} </a> <br/> {/section} I want to add {include file="$categoriesCell"} after each display of a departments. $categoriesCell is blank if a user havnt selected any department Please help. Link to comment https://forums.phpfreaks.com/topic/54856-include-products-between-departments-menu/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.