Tokens inside body

Topics: Core, Customizing Orchard
Oct 30, 2013 at 12:18 AM
Can we use the tokens in the Body? Does it cause performance issue? Thanks in advance.
Oct 30, 2013 at 6:23 AM
Edited Oct 30, 2013 at 6:24 AM
No you can't. But building a similar part that does take tokens may not be too difficult. Maybe a filter could do the trick too.
Oct 30, 2013 at 8:08 AM
HI BertrandLeroy, thanks for your reply. I'm not sure what the filer you mean. Could you give me more explanation or some links? Thanks.
Oct 30, 2013 at 3:28 PM
Look at IHtmlFilter, ITokenizer, and their existing implementations and usage.
Nov 5, 2013 at 11:48 PM
Is there a particular reason why tokens are not permitted in the Body part by default, Bernard? To my naïve mind it seems like a logical and powerful usage of the tokens system.
Nov 6, 2013 at 4:50 AM
Because it's never been implemented, because it's easy to implement as a third party module, because it would impair cacheability, and because tokens have not been designed as a templating engine. But if you want to do it, you are welcome to build a module. (also, my name's not Bernard).
Nov 6, 2013 at 5:17 AM
Fair enough (and apologies, it's been a long day).
Nov 6, 2013 at 5:18 AM
No problem.