I'm working on an encyclopedia-type of project and need some pages to be listed under more than one category. Is there a way to designate a page as a sub-page of more than one parent page?
the silverstripe database structure won't allow more than one parent id for a page, but there are other possibilities:
- use 'VirtualPage' in the sitetree (i was having problems with this one in previous silverstripe versions, can't say wheter it's doing fine now)
- refactor your code using dataobjects (see the tutorials on this or just post here again in case you need further advice)
Thanks, I definitely need more advice. I haven't read the tutorial on dataobjects yet but I will.
How does the VirtualPage work for what I want to do?
i suppose you're using 'category' pages, such as 'food' and 'fruit'.
so for a page called 'apple', you might first create the page in the sitetree as a child of 'food', then you could switch to 'fruit' and create a virtualpage there, pointing to the 'apple' page created under 'food'. :-)
as for the dataobject approach, you should work through tutorial 5, but make sure you're already familiar with the concepts explained in the previous tutorials (except tutorial 4 maybe).
Hey, that's great. The VirtualPage option seems to be just fine. One question - will it create issues of duplicate content in search engines?