Jump to content

include products between departments (menu)


raja9911

Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.