Help Center Live Community

Support => Daily Operations => Topic started by: corncomps on September 23, 2007, 09:01:10 AM



Title: drop down menu
Post by: corncomps on September 23, 2007, 09:01:10 AM
Hi i am wondering if some one could help me out i am trying to work out how to change the part from where the customer picks the department from the way it is to a drop down menu.

Daniel Simmons


Title: Re: drop down menu
Post by: HCL Admin on September 23, 2007, 03:10:28 PM
That would be something you would change in the template.  Most things are passed to the template as a data array.  The template engine is Smarty, and there is a wealth of information at http://smarty.php.net if you care to learn more about it.


Title: Re: drop down menu
Post by: victor on October 09, 2007, 07:00:06 PM
hi corncomps, here the instructions to do that if you are using Bliss template:
1.- Open templates/bliss/live_main.tpl

2.- Find this code :
Code:
<table width="90%" border="0" cellspacing="1" cellpadding="2" class="border">
  <tr>
    <td class="dark"><div align="center">{if $retry == 'true'}<b>{$lang.retry_select_department}</b>{else}{$lang.select_department}{/if}</div></td>
  </tr>
    {section name=i loop=$avaliable}
        {if $avaliable[i].status == 'true'}
  <tr class="online">
    <td><div align="left"><input type="radio" name="departmentid" value="{$avaliable[i].id}"{if $departmentid == $avaliable[i].id} checked="checked"{/if} /> {$avaliable[i].name} - Online</div></td>
  </tr>
        {else}
  <tr class="offline">
    <td><div align="left"><input type="radio" name="departmentid" value="{$avaliable[i].id}" disabled="disabled" /> {$avaliable[i].name} - Offline</div></td>
  </tr>
        {/if}
    {/section}
</table>

3.- Replace with this code:
Code:
<table width="90%" border="0" cellspacing="1" cellpadding="2" class="border">
  <tr>
    <td class="dark"><div align="center">{if $retry == 'true'}<b>{$lang.retry_select_department}</b>{else}{$lang.select_department}{/if}</div></td>
  </tr>
  <tr><td>
  <select size="1" name="departmentid">
    {section name=i loop=$avaliable}
        {if $avaliable[i].status == 'true'}
<option value="{$avaliable[i].id}"{if $departmentid == $avaliable[i].id} selected{/if} /> {$avaliable[i].name} - Online</option>
        {else}
        {/if}
    {/section}
  </select>
    </td></tr>
</table>

And it's done, I hope this helps