Hi,

For a site I am working on there will be many news contributors. I wish to ensure that they always create a dmNavigation object with all content added to the tree. To do this I am working on a small mod to automatically create the dmNavigation with other types. This will offer a simple one click option for content creators to add content whilst ensuring that they also create a dmNavigation object in the tree.

My ideal solution, and most logical for users, would be to create the dmNavigation automatically from the createObject for dmNews, dmEvent .. etc. But this is a more complex modification, as the object is created in the tree and then the dmNavigation would then have to be inserted between the new object and the tree.

The simplest solution that i have found is to make the dmNavigation a custom type and add a dropdown selection to allow the user to select the type of content to create.
<select name="autocreate">
<option value="none">none</option>
<option value="dmNews">News</option>
<option value="dmEvent">Event</option>
<option value="dmLink">Link</option>
</select>


Then when completing the creation of the dmNavigation object I then replace

<script language="JavaScript">
parent['editFrame'].location.href = '#application.url.farcry#/edittabOverview.cfm?objectid=#stObj.ObjectID#';
</script>


with

<cfif isdefined("form.autocreate") and form.autocreate neq "none">
<script language="JavaScript">
parent['editFrame'].location.href = '#application.url.farcry#/navajo/createObject.cfm?objectId=#stObj.objectid#&typename=#form.autocreate#';
</script>
<cfelse>
<script language="JavaScript">
parent['editFrame'].location.href = '#application.url.farcry#/edittabOverview.cfm?objectid=#stObj.ObjectID#';
</script>
</cfif>


Any suggestions for improvements? Offers to include in standard Farcry?

Chris.

---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to