Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Way for coldfusion to control image list inside xml module

Posted on 2010-01-01
6
Medium Priority
?
193 Views
Last Modified: 2013-12-24
I know cf can' t run inside xml but maybe there's another way ...

I purchased an image carousel but the script containing the list of images to run is inside an xml file. My images need to be dynamically obtained from the output of a cfquery, at least 20 images per area. Of course, xml will not run cf tags. So, is there any workaround to get the cfquery to execute so I can run the cfquery?

I know I can save the output of the query to an .xml file but there are thousands of areas and I'd rather find some dynamic way to do this, something I've not thought about, some way to use coldfusion and xml together. I contacted the author and it appears the image names and paths need to be in the xml file.

I don't know Flash, or xml so have to rely on basic options I can change in the xml file. I mention this so you don't suggest a different program which requires any kind of flash knowledge.

Reference to the image carousel: http://www.flashcomponents.net/component/3d_image_carousel.html
<cfoutput query="NewsInfo">
<?xml version="1.0" encoding="iso-8859-1"?>
<menu Radius="820" tilt="190" rotationSpeed="500" window="_blank">

 <MenuItems Src="/3dc/images/#NewsInfo.image#" />
	
</menu>

</cfoutput>

Open in new window

0
Comment
Question by:Qsorb
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:duncancumming
ID: 26161528
Use CFXML in conjuction with the output of your query, to create an XML object.  Save that as a file that the carousel script can use, using cfxml.

Is the query likely to change at runtime, or is the list of areas fairly static?  you could setup a scheduled task to create all the xml files in one go, say overnight or once a week.
0
 

Author Comment

by:Qsorb
ID: 26162438
> Use CFXML
Don't  know what you  mean. What is CFXML? Looks like I need some kind of example so if you'd give one I'd appreciate it and might begin to understand.

The areas are always changing, minute by minute. And there are thousands of area.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 26162559
Hello Qsorb,
you are telling many words to say Nothing.
Give one simple example for one example area and one example cfquery and one example XML output that you need and it will be not a problem at all for any expert here to show you how that example is written syntactically correct.

So please no details what you know and dont know but one explicit example what your query is so far and what XML is needed by your component.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 

Author Comment

by:Qsorb
ID: 26162694
Zvonko:
> you are telling many words to say Nothing
>So please no details what you know and dont know

I'm getting the same thing here from you, plus a rude atitude I don't appreciate or need. And I don't need to be told what to say or not.

Just look at my code snippet I left in my original question. You did look at it didn't you? It shows exactly what I need for the xml document and an example cfquery.
0
 
LVL 16

Accepted Solution

by:
duncancumming earned 2000 total points
ID: 26163455
cfxml is a coldfusion tag that creates an XML object for you.  This can then be used anywhere you need to use XML, e.g. if you have to create a .xml file.

It would probably be worth reading this:
http://livedocs.adobe.com/coldfusion/8/htmldocs/XML_09.html

Amending your earlier example, you'd maybe do something like this.  The yourXML variable you can then use to write to file, output on page, etc.


<cfxml variable="yourXML">
<cfoutput query="NewsInfo">
<menu Radius="820" tilt="190" rotationSpeed="500" window="_blank">
<MenuItems Src="/3dc/images/#NewsInfo.image#" />
</menu>
</cfoutput>
</cfxml>

Open in new window

0
 

Author Closing Comment

by:Qsorb
ID: 31671883
That helps me on the way, something to work with, and thanks.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question