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

Use of data-sly-template

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.

arunpatidar
arunpatidarAccepted solution
New Participant
May 31, 2019 12:27 PM UTC

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

1 reply

arunpatidar
arunpatidarAccepted solution
New Participant
May 31, 2019 12:27 PM UTC

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.
Translate
Arun Patidar