You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How I could reuse this snippet in my template?
E.g., I need template like this:
{?dust}
<divclass="my-little-block"><h3class="title">My first block</h3><divclass="little-block-content"><div>...more html with {some} {params}...</div></div></div>
{:else}
<divclass="my-little-block"><h3class="title">Look ma, table!</h3><divclass="little-block-content"><table>some other html {with} {different} {data}</table></div></div>
{/else}
And I want not to copy-paste html-layout for my little block, but use some partial with it. Now I can't do this...
Something like this:
{?cond}
{>myLittleBlock}
{<title}My first block{/title}
{<content}
<div>...more html with {some} {params}...</div>
{/content}
{/myLittleBlock}
{:else}
{>myLittleBlock}
{<title}Look ma, table!{/title}
{<content}
<table>some other html {with} {different} {data}</table>
{/content}
{/myLittleBlock}
{/cond}
The text was updated successfully, but these errors were encountered:
You seem to be looking for a template that can take simple parameters and large chunks of code as a parameter value. I've got a dust helper that should meet your needs.
For example, I have little html-snippet
How I could reuse this snippet in my template?
E.g., I need template like this:
And I want not to copy-paste html-layout for my little block, but use some partial with it. Now I can't do this...
Something like this:
The text was updated successfully, but these errors were encountered: