21492 Posts in 5783 Topics by 2621 members
|Go to End|
2 December 2009 at 10:04am Last edited: 2 December 2009 10:04am
Something I'd find really handy would be to be able to embed variables/functions/whatever in the content as entered via the TinyMCE editor - i.e., treat this user-edited content as if it were an SS template. So, for example, the maintainer of the site could write whatever they like on the page but if they wanted a table of students in their page, they could simply type in $StudentTable and this would be correctly parsed as templates are.
Is this completely far-fetched?
2 December 2009 at 12:15pm
2.4 will have tokenized content support for doing just this . I don't think it made it into the alpha but I think it should be in the 2.4 branch (if you use svn). Currently one of the easiest ways is just doing http://doc.silverstripe.org/doku.php?id=recipes:customising-content-in-your-templates, but thats not very nice. The token system will be more useful.
2 December 2009 at 10:50pm
Great to hear this will be there for 2.4. In the meantime, though, the existing technique looks as if it will work fine for me - thanks for pointing it out!
|Go to Top|