Jump to:

1347 Posts in 439 Topics by 514 members

Themes

SilverStripe Forums » Themes » Replace Content Var by code-snippet

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 600 Views
  • Silverfish
    Avatar
    Community Member
    59 Posts

    Replace Content Var by code-snippet Link to this post

    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

  • Willr
    Avatar
    Forum Moderator
    5464 Posts
    600 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.