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.

Customising the CMS /

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

SidebarHTML content disappearing


Go to End


4 Posts   932 Views

Avatar
mhdesign

Community Member, 216 Posts

18 October 2011 at 4:29pm

It shouldn't be so hard... I've customised my SilverStripe install to add a SidebarHTML tab to the CMS. The idea is that selected pages I can include a short sidebar. I have the Sidebar tab. I can enter text into the field. Unfortunately when I click 'save' the text disappears!

I must have forgotten something fairly basic - damned if I can see what? Can anybody give me any clues?

Thanks!

Avatar
Howard

Community Member, 215 Posts

18 October 2011 at 5:19pm

Hard to know without seeing your code but have you remembered to add 'SidebarHTML => 'HTMLText' to the db array in the Page class?

Avatar
Willr

Forum Moderator, 5523 Posts

18 October 2011 at 5:21pm

If you have checked what Howard recommended (that you have it in your $db array for page) also double check you've run your site.com/dev/build to rebuild the database.

Avatar
mhdesign

Community Member, 216 Posts

18 October 2011 at 5:49pm

Always do a /dev/build/ so that wasn't it -- but I checked the code against an older site I built before coming back to my post and sure enough - $db array was missing form Page.php

Argghh - *embarassment* - thought I was going mad!!

Thanks guys!