Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » SidebarHTML content disappearing

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

Page: 1
Go to End
Author Topic: 415 Views
  • arthurdent
    Avatar
    Community Member
    163 Posts

    SidebarHTML content disappearing Link to this post

    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!

  • Howard
    Avatar
    Community Member
    215 Posts

    Re: SidebarHTML content disappearing Link to this post

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

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: SidebarHTML content disappearing Link to this post

    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.

  • arthurdent
    Avatar
    Community Member
    163 Posts

    Re: SidebarHTML content disappearing Link to this post

    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!

    415 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.