Yealink Forums

Full Version: Smarty Template Engine
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is anyone using Smarty Template Engine to Dynamically assign Line Key functions instead of Statically assigning? Examples are.
Static:
line1_name: “x301”
line1_authname: “sip301_abc”
line1_password: “ZAq1XSw2@#”
line1_shortname: “x301”
line1_displayname: “John Smith”

Dynamic:
{assign var="position" value=1}
{foreach item=line_key key=id from=$line_key_list}
{if $line_key.line_key_type == 1}
line{$position}_name: "{$line_key.key_label}"
line{$position}_authname: "{$line_key.sip_username}"
line{$position}_password: "{$line_key.sip_password}"
line{$position}_shortname: "{$line_key.key_label}"
line{$position}_displayname: "{$line_key.extension_name}"
{assign var="position" value=$position+1}
{/if}
{/foreach}

I am trying to come up with a template for the T2XP series. Any assistance is greatly appreciated.
Sorry currently we don't support Dynamically assign Line Key, you should assign it statically, from webpage, or via auto provisioning.
Reference URL's