macromedia.coldfusion.cfml_general_discussion
[Top] [All Lists]

Image in xml file created with cffeed?

Subject: Image in xml file created with cffeed?
From: "crazyday"
Date: Fri, 17 Aug 2007 14:53:48 +0000 UTC
Newsgroups: macromedia.coldfusion.cfml_general_discussion
Does anyone know if there is a way to include an image in rss feed using cffeed 
tag? I need to include FeatureNewsImage fields containing paths to images in a 
database. Here is the code I have so far.





 <cfquery name="getNews" datasource="#Application.DSN#"> 
     SELECT NewsID , NewsHeadline, NewsTease , FeatureNewsImage, 
IsNewsFeatured,  IsNewsActive 
      FROM tblNews 
      WHERE  IsNewsActive = 1
 </cfquery>

 <cfset columnMapStruct = StructNew()>
  
 <cfset columnMapStruct.content = "NEWSTEASE"> 
 <cfset columnMapStruct.title = "NEWSHEADLINE">


  <!---Set the feed metadata.---> 
 <cfset meta.title = "Title here">
 <cfset meta.link = "http://feedlink";>
 <cfset meta.description = "Description here"> 
 <cfset meta.version = "rss_2.0">

 <!--- Create the feed. --->
 <cffeed action="create" 
     query="#getNews#"
     xmlvar="rssXML"
     properties="#meta#"
     columnMap="#columnMapStruct#"
     outputfile="test.xml" 
     overwrite="yes">

 Thanks a lot


<Prev in Thread] Current Thread [Next in Thread>
  • Image in xml file created with cffeed?, crazyday <=