J�rgen M. SKog�s wrote:

Hi,

If i add objects like i have done in the example under:
http://www.duzzy.net/listing.jpg

How can i referer to "some file" and "top page image" in my templates?


In your example the objects "Top Page Image", "Some File" and your private html page all sit under the Home dmNavigation object. To reference these 3 objects you need to get the Home dmNavigation details as the 3 objects are stored in the dmNavigation aObjectIds array.

So in your template you would do something like this:

<cfimport taglib="/farcry/fourq/tags" prefix="q4">

<!--- get parent nav node details --->
<q4:contentobjectget objectID="#request.navid#" r_stobject="stParent">

<!--- Loop through objects under parent --->
<cfloop from="1" to="#arrayLen(stParent.aObjectIds)#" index="item">
<!--- get object details --->
<q4:contentobjectget objectID="#stParent.aObjectIds[item]#" r_stobject="stObject">
<!--- check if object is a dmImage object --->
<cfif stObject.typename eq "dmImage">
<!--- display image --->
<cfoutput><img src="#application.url.webroot#/images/#stObject.imageFile#"></cfoutput>
</cfif>
</cfloop>


If you had the images uploaded as part of the dmHTML object you could loop through the stObj.aObjectIds instead of getting the navigation node details.

Hope that helps :)

-Brendan
http://farcry.daemon.com.au

---
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