> -----Original Message-----
> From: [EMAIL PROTECTED]
[mailto:bounce-farcry-
> [EMAIL PROTECTED] On Behalf Of Michael J. Sammut
> Sent: Friday, August 20, 2004 9:51 AM
> To: FarCry Developers
> Subject: [farcry-dev] Re: TeaserImage can't be shown
>
> You can use the q4:contentobjectget, for example:
>
> <cfif stobj.teaserImage is not "">
> <q4:contentobjectget objectid="#stobj.teaserImage#"
> r_stobject="teaserObj">
>
> /images/#teaserObj.thumbnail#
>
> </cfif>
One quick addition to this. If you're going to use ContentObjectGet then
it's a good idea to include the typename if you know it. In this case we
know it's "dmImage" so we should add [typename="dmImage"] to the tag
call. This prevents fourq from running to refObjects in the dB to lookup
the typname of the objectid. Less overhead is almost always good :)
Alternatively, since we know the typname we can do away with the tag
call and script a new instance of the type and get the data with a
little less overhead
<cfscript>
qTeaserImageProps =
createObject("component",application.types.dmImage.typepath).getData(stO
bj.teaserimage);
</cfscript>
<cfoutput>
<img src="/images/#qTeaserImageProps.thumbnail#"
title="#qTeaserImageProps.title#" alt="#qTeaserImageProps.alt#"
height="#qTeaserImageProps.height#" width="#qTeaserImageProps.width#">
~tom
---
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/