You are here Support Forums
Search:  
Picture View Template
Last Post 12 Feb 2011 10:57 AM by Richard Edwards. 2 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
Sort:
NextNext
You are not authorized to post a reply.
Author Messages
prattmi
New Member
New Member
Posts:1

--
11 Feb 2011 03:02 PM  
Does anyone know how I can make this work? I have a query that gathers the names of picture files from a server and I need them to display in the SQLview module. The query looks like this:

Select Pic1, Pic2, Pic3, Pic4 From RealEstate_DNN_Listing Where CAST(ID AS VarChar(10))='[QUERYSTRING:ID]'

The link from the other page provides the ID number and the query works fine, I get the filenames for Pic1, Pic2 etc.

I need them to display in a single column but the grid view will only put them in a row. I have an XSL file that will show the filenames, I just can't get the syntax right to point to the actual files on the web server such as: http://www.Picserver.com/newpics/121b07f3-b0cb-46e5-bb02-741be895c1bd.jpg
_________________________________________
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="SQLData">
<B>Pictures</B><BR/>
<TABLE CELLPADDING="8" CELLSPACING="1" Border="1">
<xsl:for-each select="Table">
<TR>
<TD><xsl:value-of select="Pic1"/></TD>
<TD><xsl:value-of select="Pic2"/></TD>
<TD><xsl:value-of select="Pic3"/></TD>
<TD><xsl:value-of select="Pic4"/></TD>
</TR>
</xsl:for-each>
</TABLE>
</xsl:template>
</xsl:stylesheet>

__________________________________________

This is the result of the template above:

Pictures
121b07f3-b0cb-46e5-bb02-741be895c1bd.jpg c22bcb6a-49ac-4647-86e5-585dcb4c1805.jpg a63dfe9f-4291-48b2-a9b5-2c441979cfa5.jpg 5a5fb05f-fa9d-4747-85a0-619f70352ffa.jpg


-M.Pratt
Richard Edwards
DNNStuff Founder
Veteran Member
Veteran Member
Posts:1207
Avatar

--
12 Feb 2011 10:55 AM  
Hi M.Pratt,
 You'll need to get an tag in there somewhere with the src attribute set to your image url.
Something like this:


Richard Edwards
DNNStuff Founder
Did you receive excellent support? Consider leaving a testimonial
Richard Edwards
DNNStuff Founder
Veteran Member
Veteran Member
Posts:1207
Avatar

--
12 Feb 2011 10:57 AM  
Darn, I really hate these Active Forums for inserting code snippets. Email me at support@dnnstuff.com and I'll send you the code I'm trying to post.


Richard Edwards
DNNStuff Founder
Did you receive excellent support? Consider leaving a testimonial
You are not authorized to post a reply.

Active Forums 4.1
Privacy StatementTerms Of UseCopyright (c) 2004-2012 DNNStuff