Jump to:

5539 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Assign a page to multiple parents

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

Page: 1
Go to End
Author Topic: 1358 Views
  • Jatinder
    Avatar
    Community Member
    23 Posts

    Assign a page to multiple parents Link to this post

    Hello,

    Is it possible to assign a page to more than one parent. That is something like this:

    Collection 1
    |
    |------------House 1
    |------------House 2
    |
    Collection 2
    |
    |------------House 1
    |------------House 3

    I am developing a application wherein admin can create multiple collections (categories) and then add properties (houses) to these collections.

    I am new to SilverStripe therefore would any appreciate help or pointers.

    Thanks,
    Jatinder

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Assign a page to multiple parents Link to this post

    The easiest (ie, no code) method is to use 'virtual pages'. When you are creating a page, select 'virtual page' and select page that you want to use. It is effectively the same as having a page in multiple locations.

  • Kalileo
    Avatar
    Community Member
    127 Posts

    Re: Assign a page to multiple parents Link to this post

    Unfortunately that seems to work with regular Pages only.

    If using ecommerce "product" pages and adding a product from a different product group as virtual page to another product group then the virtual page does not find its content.

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: Assign a page to multiple parents Link to this post

    Build your own?

    With a new TreeDropdownField you should be able to access the page by id and pull the content from it with DataObject::get_by_id($obj, $id);

    Word of warning: I have never worked with ecommerce productpages

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