Is there a way to modify a display template to pull in a variable? I'd like to modify crm/res/templates/record/panels/activities.tpl to include a button linking to another page. I'd like to pass the account id variable to the url I'm hardcoding in. I currently have the button displaying and it works if I hardcode the id number in, but I want the button to work for each account it's on. It was 100 times faster for me to create this basic php page (AllAccountNotes.php) and I'd like to display it based on the account id.
I tried {{account.id}} and {{{account.id}}} but these don't work.. I think those are for email or pdf templates and not the actual program templates? It's difficult to search for this as it's the same name as a feature.
I currently have it looking like this:
<div class="btn-group button-container">
<button class="btn btn-default"><a href="http:MyDomain/basicCode/AllAccountNotes.php?id=587627496bbd187f8">View All Notes</a></button>
<button class="btn btn-default all{{#ifEqual currentTab 'all'}} active{{/ifEqual}} scope-switcher" data-scope="">{{translate 'All'}}</button>
{{#each tabList}}
<button class="btn btn-default all{{#ifEqual ../currentTab this}} active{{/ifEqual}} scope-switcher" data-scope="{{./this}}">{{translate this category='scopeNamesPlural'}}</button>
{{/each}}
</div>
<div class="list-container">
{{{list}}}
</div>
Any hint or help is welcome.
I tried {{account.id}} and {{{account.id}}} but these don't work.. I think those are for email or pdf templates and not the actual program templates? It's difficult to search for this as it's the same name as a feature.
I currently have it looking like this:
<div class="btn-group button-container">
<button class="btn btn-default"><a href="http:MyDomain/basicCode/AllAccountNotes.php?id=587627496bbd187f8">View All Notes</a></button>
<button class="btn btn-default all{{#ifEqual currentTab 'all'}} active{{/ifEqual}} scope-switcher" data-scope="">{{translate 'All'}}</button>
{{#each tabList}}
<button class="btn btn-default all{{#ifEqual ../currentTab this}} active{{/ifEqual}} scope-switcher" data-scope="{{./this}}">{{translate this category='scopeNamesPlural'}}</button>
{{/each}}
</div>
<div class="list-container">
{{{list}}}
</div>
Any hint or help is welcome.
Comment