Stephen Moretti wrote:
I think what you're after is:

oImage = createobject("component","farcry.farcry_core.package.types.dmImage");
imagePath = getURLImagePath(stObj.ImageID,"thumb|original|optimised");


    In upgrading a client to v. 3.0.1 from 2.? we lost the display of the
    teaser image in the dmFact content type.

    I see that the structure for the content object now includes the UUID of
    the teaser image instead of the path to the image, but I can't for the
    life of me figure out how to get the image path from the UUID, and I
    can't find an example anywhere.

    So, I need something like <img src="#getPathToImage(stObj.imageId)#">

Thanks for the suggestion, Stephen. It turns out that wasn't what I needed (or was but I didn't realize it.)

I found my solution at Trond Ulselth's blog: http://trond.ulseth.no/index.cfm/FarCry

I just needed to add a piece of code in the display method for dmFact. I'm including the entire file in case someone else can use it:

<cfsetting enablecfoutputonly="yes">

<cfimport taglib="/farcry/fourq/tags" prefix="q4">
<cfoutput>
<table id="extLinks">
  <tr>
    <td class="extLogo">
    <cfif len(trim(stObj.imageId)) gt 0>
<q4:contentobjectget objectID="#stObj.imageId#" r_stobject="getObject"> <cfoutput><img src="/images/#getObject.imagefile#" align="right" alt="#getObject.alt#" /></cfoutput>
    </cfif>
    </td>
    <td class="extTeaser">
      <h4><a href="#stObj.link#" target="_new">#stObj.Title#</a></h4>
      <p>#stObj.body#</p>
    </td>
  </tr>
</table>
</cfoutput>
<cfsetting enablecfoutputonly="no">

--
Steve Clason
Boulder, Colorado, USA
(303) 818-8590

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to