Questions tagged [smarty]

Questions relating to CiviCRM's use of the Smarty templating syntax.

Filter by
Sorted by
Tagged with
9
votes
4answers
628 views

How can I include a custom template file in an email template using smarty?

Details We would like to create a standard header and footer for our email templates. Rather than pasting the custom HTML in the top of each system email template we want to override, it would be ...
2
votes
1answer
128 views

How to deal with ' or (') in CKeditor

I am unable to use smarty in CKeditor because it's transforming the ' into & #39; I couldn't find anything useful when click the configure CKEditor Button in display preferences.
7
votes
3answers
726 views

How can I see the available tokens for message templates?

For a page in the browser, we can put &smartyDebug=1 in the URL to see variables in scope for the top level template. How can we do this for message templates?
6
votes
3answers
796 views

Escaping quotes in ckeditor breaks smarty-syntax

The ckeditor has the habit to escape characters like quotes or umlauts. This breaks the smarty-syntax when generating PDFs or mails. Is there a good work-around or solution?
6
votes
1answer
392 views

Can I create a custom System Workflow Message for a particular Contribution Page?

I need to create a custom system workflow message for Contributions - Receipt (on-line) that will be used instead of the default template when a particular contribution page is used. I already ...
2
votes
1answer
182 views

Contribution Note Smarty Variable

So I'm super close to getting a smarty variable working to place the contribution note in a thank you letter. I used the API explorer and got this far: {crmAPI var='result' entity='Note' action='...
6
votes
7answers
931 views

How can I add/rearrange custom fields in the default contact view template?

We would like to rearrange the output of custom fields on the basic contact view page (in Drupal, /civicrm/contact/view?cid=NNNN&reset=1) in CiviCRM 4.5 on Drupal 7. Specifically, since this is a ...
0
votes
1answer
38 views

Remove link(s) from an Activity View screen via crmReplace

How should {$form.source_contact_id.html} from \civicrm\templates\CRM\Activity\Form\Activity.tpl be altered so only text remains/ without an URL? smarty escape doesn't seems to be a good idea, ...
2
votes
2answers
1k views

How do I pass a variable to a smarty template?

Big picture: I'm working on a module that will display view-only custom data on a specific contribution page. Please understand, if you're not aware of this already, view-only custom data is not ...
2
votes
1answer
135 views

Smarty code not working

Writing as a self-answered question since it may help others... I am adding smarty code to a mail template. Including: {capture assign=designation}{contribution.contribution_source}{/capture} Later ...
2
votes
1answer
67 views

Add 'Non-deductible amount' to Contribution Receipt template

I am trying to add the non-deductible amount to my Automatic Contribution receipt but it is not printing the value. Any tips? I am using Civicrm 4.6.19 with Drupal 7 <tr> <td {$...
2
votes
1answer
150 views

Scheduled Reminder Email is Empty

We are using CiviCRM 4.6 on a live site we built with WordPress 4.6.1. We ran into the problem explained below. Any help is much appreciated. I have set up a scheduled reminder to send reminder ...
1
vote
0answers
32 views

I am adding crmButton in the template for EventInfo.tpl , how can I add drupal callback function and makesure it does not breaks as is the case here?

{crmButton p='drupal/event-workflow/$uid/$gid' q="action=browse&reset=1&gid=$gid" icon="th-list"}{ts}Request for Approval{/ts}{/crmButton} Where I have defined $uid and $gid variables in ...
1
vote
0answers
52 views

Smarty does not display database fields

As a workflow message for a contribution confirmation, i use the following template. All values are displayed, except $financial_type_id and $source. Both stay empty in the output table. How come only ...