Message of the day:
Welcome to SilverStripe | Current stable: https://goo.gl/C4F1T9 | Feature requests: https://goo.gl/EcQ34L | Community Forum: https://forum.silverstripe.org | StripeCon EU 2019! https://stripecon.eu
If you have any SilverStripe related questions, please supply the version of Framework you're using.
Did you flush? 🚽 =
That’s because you are adding an
Thanks @thats4shaw — got that but I’ve still got an
UploadField. Think the problem’s with this line:
- $fields->addFieldToTab("Root.Subtitle", new UploadField('TextareaField'));
You don’t want to add a relationship, you just want to add a field. Should be something more like:
- private static $db = [
- 'Subtitle' => 'Text'
Hey @thats4shaw, working on this now. We’ve got a few tabs on this page, I’ve added a new field
Root.Subtitle and rebuild DB, etc. All good except for the fact that I have an Upload Field added instead of a text field! Can you see where I went wrong?
That’ll get you started but in all honesty I think you’d be better off just adding a new field as suggested above.
@thats4shaw — and the way I would write an extension is set out on this page: https://docs.silverstripe.org/en/4/developer_guides/extending/extensions/, yes?
@John Wilson has joined the channel
You would need to write an extension.
@firesphere — yes, the <h2> is inside the content. Which is why I thought
$Content.h2 would work… so would I still need to write an extension or is my syntax wrong?