AnsweredAssumed Answered

How do I get current user id from .hbs files?

Question asked by Autchara Chaiprom on May 22, 2016
Latest reply on May 25, 2016 by Autchara Chaiprom

Hi all,


I'd like to get current user id from detail.hbs file in clients/base/fields/phone then I pass parameter to function one()

then function redirect to custom view.php like this: view.php?module=<module name>&id=<id>&user=



in detail.hbs:

{{#if value}}
<div class="ellipsis_inline" data-placement="bottom"{{#if dir}} dir="{{dir}}"{{/if}} title="{{value}}">
    {{#if skypeValue}}
        <a href="callto:{{skypeValue}}">{{value}}</a>
        <img src="custom/icon_phone.png" onclick="one('{{module}}','{{}}','{{}}');">


for {{module}} return module name

for {{}} return id

but for {{}} not return any data.


I just tried with code below but not work:

<img src="custom/icon_phone.png" onclick="one('{{module}}','{{}}','{{}}');">


So for {{}} and {{}} not work.

How do I pass current user id into my function via detail.hbs or I can't?


Sugar 7.6 Ent