Hello again
The 'extends' does not change in the sense of that the path is not transformed
into an <id:path>.
The way we set it up was that we did the renaming (paragraphs > components)
first so we didn't have to further adjust the ids. The id creation scripts will
take the current states of the nodes, so all renaming should be done first.
However, if you absolutely need to adjust the path because you extend some
paragraphs in stk, the best way to do it would be in
ChangeReferencesToExtends.groovy since you're already running through the
nodes. There's a very handy function in MigrationUtil that will let you replace
parts of a value in a property, such as:
[code]
ContentUtil.collectAllChildren(root).each { rootChild ->
MigrationUtil.replaceSubstringInProperty(rootChild, "extends",
"standard-templating-kit/templates", "standard-templating-kit/templates/pages")
MigrationUtil.replaceSubstringInProperty(rootChild, "extends",
"standard-templating-kit/paragraphs",
"standard-templating-kit/templates/components")
rootChild.getNodeDataCollection('reference').each { referenceNodeData ->
MigrationUtil.renameProperty(referenceNodeData, "extends")
}
}
[/code]
The above is an example for replacing all occurences of 'extends' with values
stk/templates and stk/paragraphs into the new way stk/templates/pages and
stk/templates/components. I had removed this in revision 51098 [1] due to our
changes in order of execution, but it might be useful for your case. It's
basically just the example from above :)
HTH,
Natascha
[1] http://svn.magnolia-cms.com/view?view=revision&revision=51098
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=9b0fae1b-60b1-460e-a5da-134ca55576be
----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------