Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ankush 2 posts 21 karma points
    Jun 19, 2013 @ 15:29
    ankush
    0

    problem in image rendering

     I have made a website in umbraco. i first created it in turkish language then i copied that node in content node and set a new hostname for that. so now my site is in two languages. But after i have converted my site into multilingual site, i am having problem in rendering image. I am using getMedia method to render image, but images renders some times and some times i got empty src. I have searched a lot on net but i did not find any solution. I am posting my code.  Please help me.

    My site url is http://www.wedclassis.com/en/magonline/

    code

     <ul class="books">

    <xsl:for-each select="$currentPage//Book">

    <li>

    <h3><xsl:value-of select="@nodeName" /></h3>

    <xsl:variable name="bookImage" select="umbraco.library:GetXmlNodeById(@id)/bookImage" />

     <a href="{umbraco.library:NiceUrl(@id)}">

    <xsl:choose>

    <xsl:when test="$bookImage &gt; 0">

    <!-- <textarea><xsl:copy-of select="$bookImage" /></textarea> -->

    <xsl:variable name="img1" select="umbraco.library:GetMedia($bookImage,'false')/umbracoFile" />

    <xsl:variable name="img2" select="umbraco.library:GetMedia($bookImage,0)/umbracoFile" />

    <xsl:choose>

    <xsl:when test="$img1!= ''">

    <img src="{$img1}" alt="" style="display: block;" />

    </xsl:when>

    <xsl:otherwise>

    <img src="{$img2}" alt="" style="display: block;" />

    </xsl:otherwise>

    </xsl:choose>

    </xsl:when>

    <xsl:otherwise>

    <img  alt="" style="display: block;" src="http://www.sunqld.com/libr/data/busisale_e/1369089779/noImage.jpg" />

    </xsl:otherwise>

    </xsl:choose>

    </a>

    </li>

    </xsl:for-each>

    </ul>

Please Sign in or register to post replies

Write your reply to:

Draft