I have a need to determine the friendly url of the nav node containing a particular page.
The following code snippet works nicely --- so long as the page in question is NOT in draft mode.
fu = createObject("component","#application.packagepath#.farcry.fu")
oNav = createObject("component", application.types.dmNavigation.typePath)
parentFU = fu.getFU(oNav.getParent(objectid=request.stobj.objectID).objectID)
I presume the problem I am encountering is caused by the getParent method failing when the object is in draft mode. I don't yet understand the intricacies of the navigation structures in FarCry and how they are effected by approval processes. Can anybody shed light on how to obtain the FU if the page is in draft?
First a bit of background...
a) the FU is built based on the navigation folder title and linked to the navigation id
b) the navigation id is what provides topographical context in the site hierarchy, not the underlying dmHTML object
c) the dmHTML object is linked to the navigation folder (dmNavigation) via a reference in the array property dmnavigation.aobjectids
d) a DRAFT object is related to the corresponding LIVE object via the VERSIONID property, therefore it has *no* direct relationship to the LIVE object's parent navigation folder
e) when a DRAFT object goes live, it assumes the objectid of the previously live object
So if you want to get the resulting FU for a DRAFT dmHTML object you need to:
i) determine the live version for this dmHTML object, grab its objectid
ii) work out the navigation folder that references the live object
iii) determine the FU for that navigation folder
Hope that helps,
-- geoff http://www.daemon.com.au/
--- You are currently subscribed to farcry-dev as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
