Automatically update content paths when copying a node structure

Chris Paynter asked on September 8, 2014 07:21

I have a node structure that uses folders to store references.

This is my node structure.

  • Master
    • Workshops
      • Workshop A
      • Workshop B
    • Features
      • Feature A
      • Workshops -- Workshop A (This is a link to the original)

If I copy Feature A and paste it in the Features folder then I can rename it and create a new feature using A as a boilerplate. The only issue I have is that the page template contains a repeater that has a content path pointing to the 'workshops' folder of Feature A.

Is there a way in Kentico to automatically change the content paths of any web parts in the event that a structure is copied.

So if I copy Feature A and rename it to Feature B, I would like the content path inside the repeater to automatically update to the Feature B folder.

Cheers

Chris

Correct Answer

Charles Matvchuk answered on September 8, 2014 16:46

You should be using Macro's to resolve paths. What I do is set up a tree node as a template. I use macro's to resolve all paths. Then I copy the node wherever I want and the path still resolves correctly. Read up on Path Expressions in the documentation.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.