1) For semi-permanent links you can set up an alias on the navigation item, and use #application.navid.youralias# to get the url.
2) If you want to allow the user to select a navigation item like from a drop down list, you could use code like what is used in the quick site builder to select the starting point:
<cfscript>
o = createObject("component", "#application.packagepath#.farcry.tree");
qNodes = o.getDescendants (dsn=application.dsn, objectid=application.navid.root);
</cfscript>
<select name="startPoint" id="startPoint">
<option value="#application.navid.root#">#application.adminBundle[session.dmProfile.locale].Root#</option>
<cfloop query="qNodes">
<option value="#qNodes.objectId#" <cfif qNodes.objectId eq application.navid.home>selected</cfif>>#RepeatString("&nbsp;&nbsp;|", qNodes.nlevel)#- #qNodes.objectName#</option>
</cfloop>
</select>
3) You can also use the object picker in the widgets tag library which opens a popup that lists all of a given type (though it won't show the tree structure and the gui is a little bit buggy):
<cfimport taglib="/farcry/farcry_core/tags/widgets" prefix="widgets">
<widgets:objectPicker typename="dmNavigation" fieldname="link" fieldlabel="
#application.adminBundle[session.dmProfile.locale].linkLabel#" fieldvalue="#output.link#">

Blair

On 5/3/06, M Wheeler <[EMAIL PROTECTED]> wrote:
Sorry,
 
custom admin code, and I am trying to link back to a navigation item in my main site from a news item. using the site navigation to populate the text box, drag and drop.  :)
 
Cheers
Mark

 
On 5/3/06, Blair McKenzie <[EMAIL PROTECTED]> wrote:
That's not very clear. Are you talking about the website or custom admin code? And what exactly are you trying to link to?

Blair


On 5/3/06, M Wheeler <[EMAIL PROTECTED]> wrote:
Hi
 
Using Farcry 3 and have a news item that needs to have a load site tree button for linking back to main site navigation if required.  Curently just have a standard form output for manual input of link
 
<label for="">#application.adminBundle[session.dmProfile.locale].linkLabel#</b>
    <input type="text" name="link" id="link" value="#output.link#" maxlength="255" /><br />
</label>
 
Link would look like
 
index.cfm?objectId=4C8B36A5-40CA-68F8-EC192A9CC08DC977
 
but load site tree would be more convenient for user, is there a widget for this functionality?
 
Thx
Mark


 






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "farcry-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/farcry-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to