Copied to clipboard

Flag this post as spam?

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


  • Fuji Kusaka 2203 posts 4220 karma points
    Mar 01, 2013 @ 09:36
    Fuji Kusaka
    0

    Check if MultipleText String is Empty

    Hi Folks,

    Am using MultipleTextSting as property attached to a document file in media section. So whenever admin uploads new file or doc i will automatically display the title as "nodeName" else if textString is not empty it users the text.

    But thing is looks like even if MultipleTextString is empty am not able to display the default nodeName.

    Can someone advise ?

    <xsl:when test="string($imgItem/data[@alias='docType']) !=' '">  

    </xsl:when>

    and even this didnt work

    <xsl:when test="string-length($imgItem/data[@alias='docType'])  &gt; 0">    

    </xsl:when>

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Mar 01, 2013 @ 10:14
    Jan Skovgaard
    0

    Hi Fuji

    Just to be sure...you are doing this on an older Umbraco instance than v4.5, right? Since this is the old schema...

    what XML does the $imgItem variable contain?

    /Jan

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Mar 01, 2013 @ 10:46
    Chriztian Steinmeier
    0

    Hi Fuji,

    Use the normallize-space() function to check this:

    <!-- New Schema -->
    <xsl:when test="$imgItem[not(normalize-space(docType))]">
       ...
    </xsl:when>
    <!-- Old Schema -->
    <xsl:when test="$imgItem[not(normalize-space(data[@alias = 'docType']))]">
       ...
    </xsl:when>

    /Chriztian

  • Fuji Kusaka 2203 posts 4220 karma points
    Mar 01, 2013 @ 11:23
    Fuji Kusaka
    0

    Tried both schema though am using v4.9.1 but no success its not givning me the nodeName.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies