CFIF Question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Seb Salcedo
    New Member
    • Oct 2011
    • 1

    CFIF Question

    On a listing page, I'm trying to display Charts thumbnails and Thumb picture if there's one available. So I need an CFIF statement similar to this: If there's a thumb, show it, otherwise show chart.

    Here's what I got so far:

    Code:
    <cfif Len(Trim(ImageThumb))>
    							<div style="float:left; ">
    							<a href="#itemLink#" #sTarget# class="N#cfs##cst#">
    							<cfscript>
    								// deinfe argument structure
    								strArgs = StructNew();
    								
    								//Application.DynamicTagGenerator
    								strArgs.sRelativePath = ImageThumb;
    								strArgs.sFileName = "";
    								strArgs.sAlternateImagePath = "#request.ImagePath#AcuCustom/#request.appTitle#/Icon/Thumbnail/";
    								strArgs.bEnforceDesignStyle = "#CurrentEnforceImageSizeYN#";
    								strArgs.sWidth = "#currentThumbWidth#";
    								strArgs.sHeight = "#currentThumbHeight#";
    								strArgs.sAltText = "#HTMLEditFormat(Title)#";
    								strArgs.bGenerateTag = 1;
    								
    								sImageThumb = Application.DynamicTagGenerator.GetImageTag(argumentCollection = strArgs);
    							</cfscript>
    							#sImageThumb#
                                </a>
    							</div>
    
    <cfelse>
    								<!--- Container for the chart --->
                                    <div id="chartStandardItemContainer#currentRow-1#" class="chartStandardItemContainer" style="width:170px; height:100px; margin-right:15px; margin-bottom:10px""></div>
                    </td>
                    </cfif>
    It show the chart for those article that has it but when it comes to the thumb, it does appear but the statement wont run for the article below that.

    Any suggestion?

    Regards
    Last edited by acoder; Oct 22 '11, 04:27 PM. Reason: Please use [code] tags when posting code
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Could you explain what you mean by "but the statement wont run for the article below that"? Which line numbers are you referring to in your code?

    Comment

    Working...