Bind an already existing object to an already existing page?


I’m wondering how I can merge two already existing objects together.

For example, I have an AppwithinMinutes application that I use in drop downs of Subject areas for users to select when creating pages with lots of other templates.

However, each Subject area already has landing pages with thorough descriptions in regular pages. In hindsight, I should have bound my subject area listings to these pages.

Is there any way to fix this?

tldr; how can I programmatically merge two objects together in a way that won’t wreck pointers/links to either one of them?

1 Like


Hi @shecodes,

For merging two objects in the general case, you can evolve one of their classes so that it contains the union of all properties, instantiate that class for each target page and copy all merged property values to the new instance. This can be done using the Velocity API. Do you think that this path could suit your need? Is there any specific difficulty that you foresee?

If you manage a large number of subjects with their own descriptions, you could be interested in having a look at a generic application that is meant to ease this process, in case you have not already (but managing topics can be very custom), it’s in basic shape for now, however a new version will be released soon with an easier selection of subjects and with automated facet generation: Page Relations Application.




Thank you for responding! Both of your ideas sound really promising. In terms of future maintenance, I’m thinking that the Page Relations Application might be the way to go. I’ll wait for the new version and give it a shot in a test environment.

I was thinking about using the Redirect Object to just redirect the user from one page to the other, but it looks like it might be kind of tricky to undo if I don’t like the results.

Thanks again for your ideas, I’ll respond again with my results!