Use of data-sly-template | Community
Skip to main content
manikanthar1295
Level 5
May 31, 2019
Solved

Use of data-sly-template

  • May 31, 2019
  • 1 reply
  • 13019 views

Hi Team,

What is exact use of data sly-template in slightly.

I have google but not getting exact usage.

Explain with some example so that i can understand exactly the use of template.

Regards

Manikantha R.

Best answer by arunpatidar

Hi,

data-sly-template block is like defining a function which can call later using data-sly-call

data-sly-template: Defines a template. The host element and its content are not output by HTL

data-sly-call: Calls a template defined with data-sly-template. The content of the called template (optionally parameterized) replaces the content of the host element of the call.

e.g.

1 reply

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
May 31, 2019

Hi,

data-sly-template block is like defining a function which can call later using data-sly-call

data-sly-template: Defines a template. The host element and its content are not output by HTL

data-sly-call: Calls a template defined with data-sly-template. The content of the called template (optionally parameterized) replaces the content of the host element of the call.

e.g.
Arun Patidar