good point, i was being a lazy typer
Tom Cornilliac wrote:
-----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
-- Regards, Michael J. Sammut ________________________________________________
F O U R E Y E S P R O D U C T I O N S think | plan | create :: web site design & development :: NYC
E. [EMAIL PROTECTED] | T: 718.254.9557 ext. 101 | F: 718.254.0399
W. http://www.foureyes.com
--- 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/
