Using tokens in blog post bodies?

Topics: General
Oct 7, 2013 at 4:36 AM
I'm trying to understand token usage and was interested to know if tokens are meant to be used inside content such as blog body posts.

For example can in the editor I write "{Model.Title}" or better still reference to a particular media resource ID and pull out its Title/Description and get it rendered on view.


If anyone has a good resource on using tokens please post.
Coordinator
Oct 7, 2013 at 4:48 AM
No, they are not meant to be used inside body. I suppose you could make it work by writing a filter however.
Oct 29, 2013 at 9:51 AM
BertrandLeRoy wrote:
No, they are not meant to be used inside body. I suppose you could make it work by writing a filter however.
Hi BertrandLeRoy. I want to know why can not use the Tokens inside the body? Is it will cause the performance issue? Our user want to insert some tokens in the body, but we didn't find a good solutions.

What do you mean about the filter? is it MVC filer? How to use the the MVC filter to solve this issue..Thank you in advance.
Coordinator
Oct 30, 2013 at 7:56 AM
Because you can't: that's just not implemented. Not an MVC filter, but an IHtmlFilter. Look at MarkdownFilter for an example.