Create server script which mirrors document contents
I'm working on an umbraco 6 project which has a lot of duplicate documents. I need multiple documents in my navigation structure which have the same content but a different title and a different position in the navigation tree. I created a documenttype with the generic property "copypage" (Type ContentPicker) where the editor can set which page's content should be mirrored. My current solution for this looks like
var page =Library.NodeById(Model.copypage);@page.contents;
but this leads to problems with macros contained in the mirrored page.
Thank you for your fast answer. Indeed my macros get rendered. Your line of code results in the same browser output as mine. My problem is that the macros get moved to the bottom of the page on the copied page:
Original
Copy
Content
Content
Macroblock
Content
Content
Macroblock
Macroblock
Macroblock
Edit: Sorry, I misunderstood my problem a little bit myself. My macros on the original page access children of their document in the tree. I do not want to copy those children to the mirrored page. So my target is to execute the macros "in the context" of the original document, so that they see the children of the original document.
Create server script which mirrors document contents
I'm working on an umbraco 6 project which has a lot of duplicate documents. I need multiple documents in my navigation structure which have the same content but a different title and a different position in the navigation tree. I created a documenttype with the generic property "copypage" (Type ContentPicker) where the editor can set which page's content should be mirrored. My current solution for this looks like
but this leads to problems with macros contained in the mirrored page.
Is the problem that macros don't get rendered?
Assuming that to be the case, you can try
Thank you for your fast answer. Indeed my macros get rendered. Your line of code results in the same browser output as mine. My problem is that the macros get moved to the bottom of the page on the copied page:
Edit: Sorry, I misunderstood my problem a little bit myself. My macros on the original page access children of their document in the tree. I do not want to copy those children to the mirrored page. So my target is to execute the macros "in the context" of the original document, so that they see the children of the original document.
Ah ok,
How about this then
is working on a reply...