Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

file_link outputting as text


Go to End


2 Posts   545 Views

Avatar
JRTotten

Community Member, 4 Posts

21 April 2015 at 8:38am

Hey everybody i'm wondering if anyone can help. I have an HtmlEditorField called Notes, that's being output in an include on 2 different pages. On one page it's rendering the HTML fine but on the other it's outputting (where the admin has used a link) the file_link id like this - blahblah.com/[file_link,id=4687]

Avatar
Devlin

Community Member, 344 Posts

22 April 2015 at 2:31am

You're probably overloading a method somewhere and parse Notes as a string instead of HTMLText.

You can reapply the shortcodes by:

ShortcodeParser::get_active()->parse($myDataObject->Notes);