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

Assign a page to multiple parents


Go to End


4 Posts   2343 Views

Avatar
Jatinder

Community Member, 23 Posts

4 February 2010 at 5:26am

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

Avatar
Hamish

Community Member, 712 Posts

5 February 2010 at 8:14am

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.

Avatar
Kalileo

Community Member, 127 Posts

2 April 2010 at 2:06am

Edited: 02/04/2010 2:06am

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. :(

Avatar
yurigoul

Community Member, 203 Posts

4 April 2010 at 2:20am

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