-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I return HTML in a virtual field? #15
Comments
Yes, just create a Handlebars.SafeString from the HTML. See here for how I created the table library links. I don't think there's a way to use {{pathFor}}, but you can call the route's path function. I should probably document this. |
Add to the documentation under Virtual Columns |
Hello, Can you explain how to call the route's path function please? If I have a route setup that shows the detailed view of one item like this:
How would I add a SafeString with a link to that path? I set up an object in the fields array like this:
But I'm getting some errors. Can you please point me in the right direction? Thanks a lot. |
Firstly, this JSON completely wrong:
Lastly: You can use templates. Instead of
where
You can use Routes.route if you want. I've done this example just to show you how a template works. |
Thanks for the example and advice, this helped clear up my confusion. |
Glad to help. You are welcome! |
In a table with blog posts (title, author, date), I'd like to hyperlink the title to a page for the blog post. Ideally this would be an iron-router {{pathFor}}, but is there a way at least to return an HTML
<a href="...computed slug...">
anchor?The text was updated successfully, but these errors were encountered: