Exam4Training

Which handlebars helper expression is used in Salesforce B2B Commerce pages and components to toggle the display of a block of markup?

Which handlebars helper expression is used in Salesforce B2B Commerce pages and components to toggle the display of a block of markup?
A . {{#ifStoreSetting ‘Field__c’}} … {{/ifStoreSetting}}
B . {{#ifSetting ‘Page.cfg}} … {{/ifSetting}}
C . {{#ifConfig ‘Field__c’}} … {{/ifConfig}}
D . {{#ifDisplay ‘Page.cfg’}} … {{/ifDisplay}}

Answer: C

Explanation:

The handlebars helper expression that is used in Salesforce B2B Commerce pages and components to toggle the display of a block of markup is {{#ifConfig ‘Field__c’}} … {{/ifConfig}}. This expression will evaluate the value of the configuration setting with the API name Field__c and render the block of markup if the value is true, or skip it if the value is false. For example, {{#ifConfig ‘CO.showMiniCart’}} <div id="mini-cart"> … </div> {{/ifConfig}} will render the mini-cart div only if the configuration setting CO.showMiniCart is true.

Salesforce Reference: B2B Commerce and D2C Commerce Developer Guide, Handlebars Helpers

Exit mobile version