Jump to:

5513 Posts in 1732 Topics by 1218 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Dropdownbox for pagetypes in CMS is not working properly

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

Page: 1
Go to End
Author Topic: 672 Views
  • chrclaus
    Avatar
    Community Member
    29 Posts

    Dropdownbox for pagetypes in CMS is not working properly Link to this post

    Hello,

    I noticed, that the dropdownbox including the pagetypes in the CMS is not filled correctly if I want to create a new page. This dropdownbox is listening to a selection-changed-event on the sitetree only if it is visible. If this box is hidden, the tree-change-event is not handled.

    By selecting another sitree-node - if the dropdownbox is not visible, and afterwards click on "Create new page" - the dropdownbox is showing the allowed page types from the sitetree object before. If I just click at another sitetree-node, the box is filled correctly. This bevaviour is because of the fact, that the dropdownbox is handling the selection-changed-events after it was made visible the first time only.

    By hiding the page-type selection the event-binding is removed. Therefore, the page-type selection shows the allowed page-types from the last selected sitetree node the next time it will be made visible. Is there any reason for it, especially a detailed functional oder technical reason or is it a bug?

    I changed the code in that way, that the event registration is done during initialization and not after the first onclick-event and that the event-registration-removal is never done anymore.

    Best regards,
    chrclaus

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