1259 Posts in 348 Topics by 484 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 428 Views |
-
Replace Content Var by code-snippet

27 April 2012 at 9:02pm
Hi All,
I want to give Editors the possibility to place prepared HTML snippets wherever they want within an open Content Textfield (HTMLEditorField).
I.e. if the Editor writes something like
'This is some Text
$mySnippet
and some more Text'
into the content field, the page should show the (hardcoded) HTML of mySnippet.ss instead of the $mySnippet var.
Is there any prepared functionality in Silverstripe for this? How would you do this?
My Approach would be to check the $UserDefinedform var of the so called module and modify it's way of replacement. Ist there a better way?Thx for any Feedback!
Kind regards
SF -
Re: Replace Content Var by code-snippet

27 April 2012 at 9:21pm
You can use short codes - http://www.ssbits.com/tutorials/2010/2-4-using-short-codes-to-embed-a-youtube-video/
| 428 Views | ||
|
Page:
1
|
Go to Top |


