Andrew Mercer wrote:
> I think you will have to go through stObj.aObjectIDs (array of object 
> IDs) looking for the dmImage type. then find the title/label you are after.
> 
> On 2/17/06, * Steve Clason* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:

>     This seems dumb, but I can't figure out how to display an image in the
>     body of a dmNews item after uploading it via the admin screens.

Thanks to both of you.  I'm being thick-headed tonight and still haven't 
quite got it, but I think I have enough to make some progress in the 
morning (getting late here).

I'll try to explain what I'm wanting to do a little better (as much for 
my benefit as anything else):

I have a page with a dynamic content container set to use a News Rule 
type. I plan on having custom display methods in dmNews to display the 
teaser and the body of the news item.

In the "News Administration" section under the "Content" tab in FarCry 
admin there is a utility for uploading images and for inserting them 
into the teaser and the body. (This site is running on 2.11--it's a 
little different in 3.0 but not a lot. I think I have the version 
numbers right.)

All of that works fine, but neither of the sample skins (Aura and Pliant 
?) have display methods that use the images, so I don't know the code to 
put in the display method so that the images will be called.

In the listserv archives I found code for the teaser image, so that part 
now works fine[1], but I can't figure out the body image.  The body 
image doesn't seem to be part of stObj so I can't just twiddle the code 
I have.

Anyway, there are probably other ways to insert images into the news 
item body page, but I'd like the client to be able to use the FarCry 
workflow to make their lives easier.  So I'd like them to be able to 
upload an image and click a button to insert it into the page and be 
done with it. And that's where I'm stuck.

I feel better just clarifying the problem--thank y'all for listening. 
I'll still take all the help I can get.

[1] Here's the code for the teaser display method:

<cfsetting enablecfoutputonly="yes">

<cfoutput>

<h4 style="clear:both;"><a 
href="#application.url.conjurer#?objectid=#stObj.objectid#">#stObj.Title#</a></h4>
<p>
<cfif len(trim(stObj.TEASERIMAGE))><!---see if teaser image exists--->
   <cfimport taglib="/farcry/fourq/tags/" prefix="q4">
   <q4:contentobjectget objectid="#stObj.TEASERIMAGE#" 
r_stobject="stImages">
   <img src="/images/#stImages.IMAGEFILE#" align="right" 
alt="#stObj.label#" style="float:left;margin:0 5px 5px 0">
</cfif>
#stObj.teaser#</p>

</cfoutput>

<cfsetting enablecfoutputonly="no">


--
Steve Clason
Web Design & Development
Boulder, Colorado, USA
www.topdogstrategy.com
(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
-~----------~----~----~----~------~----~------~--~---

Reply via email to