KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a Model with an image_id property. I have a View for that Model that contains an image element. I need to insert the id into the image element's src property to complete the URL of the image so that I'm effectively doing this: <img src="news + newsItem.imageID + .jpg"></img> My first attempt used a Handlebars helper: <img src="news{{newsImageURL newsItem.imageID}}.jpg"></img> But this also inserted Metamprph script tags around it: <img url="<script id='metamorph-10-start' type='text/x-placeholder'></script>news/7.jpg<script id='metamorph-10-end' type='text/x-placeholder'></script>" alt="" class="content-image news-media" /></a> So I've looked at using bindAttr , however as I need to transform the image_id value(by prepending and appending the rest of the path), this doesn't seem like a solution either.
Tags (comma-separated)
Save Edits
Cancel