Home How can I add html with helpers and expressions as an attribute to my partial?
Reply: 0

How can I add html with helpers and expressions as an attribute to my partial?

user724
1#
user724 Published in July 21, 2018, 6:11 am

I have a partial and I need to swap out a link depending on the context, and I also need to use helpers on my expressions within that link. I tried adding this to my partial and including it in the partial template, but it is adding the line as a string, instead of html.

{{> partial link='<a href="/matchup/{{formatForWeb this.name }}/{{formatForWeb 
matchup.name }}" class="matchup-card__link">code</a>'}}

I then added it as {{link}} to my partial template:

<div>
     {{link}}
</div>

Here it is in dev tools being added as a string to my page:

How can I make this work? Thanks for your time!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.299639 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO