Hi,
Daemon put together a custom secondary navigation for us based on FarCry which
handles the problem of seeing children, plus seeing a couple of steps before.
Take a look at http://www.aftrs.edu.au/. Code is theirs to share if they like.
Cheers,
Natalie
"Michael @Four Eyes" <mjs
Sent by: To: "FarCry Developers"
<[EMAIL PROTECTED]>
[EMAIL PROTECTED] cc:
mon.com.au Subject: [farcry-dev]
Navigation: Sharing some code with ya
17/07/03 02:14 AM
Please respond to "FarCry
Developers"
Hi All,
I came into a situation on a project where at the last level of navigation,
where no children existed, the side nav was blank. I was unsure if this was
handled in FarCry, so I took about 2 minutes to whip this together. So I
thought I would share it.
Essentially, I am doing a test to see if there are children in a particular
node. If there are no children, I am using the getParent to pull in the
objectID of current node's parent to pull in the previous levels nav..
No rocket science here, but it satisfied our need and what the client wanted!
<cfscript>
// get navigation elements to root
o = createObject("component", "#application.packagepath#.farcry.tree");
navFilter=arrayNew(1);
navfilter[1]="status IN (#listQualify(request.mode.lvalidstatus, "'")#)";
qTestSideNav = o.getDescendants(objectid=request.navid, depth=1,
afilter=navFilter);// test to see if there are children in this node. If not,
push in Parent Object
if (qTestSideNav.RecordCount) {//yes there are children
qSideNav = o.getDescendants(objectid=request.navid, depth=1,
afilter=navFilter);
}
else{
SideNavParent = o.getParentID(objectid=request.navid);// no children, so get
the parent
qSideNav = o.getDescendants(objectid=SideNavParent.ParentID, depth=1,
afilter=navFilter);
}
lv0 = 2; // nlevel for plateau
depth = 2; // default depth ie. plateau
</cfscript>
--
Regards,
Michael
---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]