Jump to:

3430 Posts in 1057 Topics by 734 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Moving page structures in the CMS Admin and Children listings

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

Page: 1
Go to End
Author Topic: 1625 Views
  • fishe
    Avatar
    Community Member
    42 Posts

    Moving page structures in the CMS Admin and Children listings Link to this post

    I have a structure like the following:

    OutfitHolder has OutfitPage children
    and...
    OutfitHolderPrevious has OutfitPage children
    and also...
    RangeHolder has OutfitHolderPrevious children

    These are relationships defined through the $allow_children variable. OutfitHolder and OutfitHolderPrevious are identical in substance. There should be only one OutfitHolder at once on the site, and multiple OutfitHolderPrevious instances - RangeHolder is the "container" for these.

    In the process of maintaining the site, there will be times where I need to change the OutfitHolder into a OutfitHolderPrevious by changing the page type in the CMS Admin area. And then I will create a new OutfitHolder type.

    The problem is, when I change the page type to OutfitHolderPrevious this particular instance isn't listed as a child of RangeHolder (e.g. when using the <% control Children %> code). Is it true that this instance of OutfitHolderPrevious actually needs to be physically beneath the instance of RangeHolder in the CMS Admin area hierarchy/site structure?

    If this is true, then I have the problem that I am unable to drag-and-drop items which have child members, which this instance has (the OutfitPage instances).

    So how can I move a page in the CMS admin area that has children? Or is there another way around this issue so I can make my newly changed OutfitHolderPrevious instance show up in the Children control output?

    Thanks in advance!

  • fishe
    Avatar
    Community Member
    42 Posts

    Re: Moving page structures in the CMS Admin and Children listings Link to this post

    No one can help me out here?

    I'm a bit lost still after more thinking about how to do this type of thing

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Moving page structures in the CMS Admin and Children listings Link to this post

    I'm a little bit confused as to what the problem is... yes, any page must be a direct descendant of another page for it to appear in a <%control Children %> block.

    What I don't understand is this: how come the page you have changed from OutfitHodler to OutfitHolderPrevious has moved to a different parent? That should not happen when you save it.

    Perhaps a screen shot would help, showing your site structure and what you're doing.

  • fishe
    Avatar
    Community Member
    42 Posts

    Re: Moving page structures in the CMS Admin and Children listings Link to this post

    Yeah it's complex to explain! I'm not sure if screenshots will help so I'll address your questions...

    When I change the page type from OutfitHolder to OutfitHolderPrevious the page does not move to a different parent (i.e. does not move in the site hierarchy).

    However, I do need to move it! I need to put it under the page of type RangeHolder so it displays as a child using the control Children block.

    However I can't drag and drop it because it has children of it's own (I'm assuming this is the reason why it won't let me drag and drop).

    This is clearer?

    One possible way around this, although not ideal for the situation, would be to use a control which just lists all the pages of OutfitHolderPrevious type. Such a control exists correct?

  • fishe
    Avatar
    Community Member
    42 Posts

    Re: Moving page structures in the CMS Admin and Children listings Link to this post

    OK my issue is resolved with the move to 2.3.0 final. Must have been a bug in RC2 preventing me from draging/droping pages with children.

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