Version 1, changed by Colin_E. 12/01/2006. Show version history
Posted by Colin_E on 12/01/2006
Tags: none
The users of my site have major problems understanding the new 2.8 "create page" and "create child page" buttons, especially as the latter comes and goes depending on the form applied to the page.
Nett result is I have new pages being created in random places all over the site.
I want my new apps to try to clean this up by saying basically-
"Find all pages of my child form type.
Check their parent node id.
If that node id is not my nodeid, move the page to be a child of this page"
I want to use nodeids because, although page names are supposed to be unique, we have seen circumstances (e.g. caused by a bug in the spreadsheet app) where there can be multiple instances of the same name.
Now, the page (in XML), has node/nodeId and node/parentId fields. However according to the docs, in the Global Variables there is a page.id, but NOT a page.parentId?
Is this true, and if so-
1) Why?
2) How can you access the parent id prorammatically (from SSJS).
Regards: Colin
Any ideas on this or am I a voice in the wilderness?
What do you mean by parentId?
Or, what are you trying to accomplish?
Will page/parent work? Gets you the parent page.
i think Jot will resolve the correct ids for you, if you set the standard page/parent property. I don't beleive you can access the nodes directly...
I've just realised there may be a simple way to deal with this. I can access the parent through page.parent, then get the parent id through the id attribute of the parent handle.
Amazing how often explaining a question to others brings you to the answer yourself.
Thanks for your help guys, and sorry fo being a bit slow on this one.