Thanks for helping with this. I am running 2.23 as this is a site which I made a while back and am now trying to add functionality. Here is the context of what i am trying to do:
I created a site for a friend who runs an ebay store ([url]http://www.urban-knights-ebay.com[/url]). It allows him to manage his product pages/faqs/postage info etc. easily and means creating a new product is super easy.
Now he wants to be able to create different enviroments for different aution sites, so that had can go to /product1/ebay or /product1/ebid to get to the enviroment for that product, giving him the correct banner and links etc. Essentially each page would have multiple 'modes' or skins for different stores. I have managed to set it up so that when he creates a new enviroment he can set all the general stuff like header image etc, but the problem I have is some of the fields on the product are enviroment specific. This means that each time he creates a new enviroment, new fields need to appear on each product to allow him to set those variables.
So for example if he creates a new enviroment page for 'ebid' then I need to add a field to the ProductPage class called Ebid_sampleLink.
I need a function attached to the product page that can cycle throughe the current Enviroment pages and add the fields as neccecary.
Can I do this with a DataObject decorator?