You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Difference between {{ }} and ]

edited Jul 26, 2021 11:56AM in Visual Builder 2 comments

Summary

Difference between {{ }} and [[ ]] while calling variables

Content

Hi,

I have had a bit of confusions with variables defined based on two different syntaxes in different sections of the code. Whats the difference between using {{ }} and using [[ ]] while calling or including variables in code.

Use case {{ }} - Implementing filter criterion in get leads api

{
"op": "$sw",
"attribute": "Name",
"value": "{{ $page.variables.filterText }}"
}

 

Use case [[  ]] - Standard template 21b

           <oj-list-view id="odcs-home-visual-navigator"
              class="oj-listview-card-layout odcs-visual-navigator oj-full-width oj-flex-item oj-sm-12 odcs-home-visual-navigator"
              selection-mode="single" :aria-label="[[ $application.translations.app.homepage_visualNavigator_title ]]"
              data="[[ $variables.navigatorDataProviderCustom ]]"
              on-first-selected-item-changed="[[$listeners.odcsHomeVisualNavigatorFirstSelectedItem]]">

 

The example itself is not of relevance. I just wanted to know why we are using {{}} in some spots and [[]] in the others. When should we use one or the other? 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!