Developer forum

Forum » Templates » if defined paragraph image link: HOW DO I?

if defined paragraph image link: HOW DO I?


Reply

Anyone .. How do I write the tag if defined: paragraph image link ??

 

I have tried the (to me) obvious: <!--@If Defined(ParagraphImageLink)-->

 

but it doesnt seem to work .. so hlp pls!


Replies

 
Reply
ddl@condurra.dk wrote:

Anyone .. How do I write the tag if defined: paragraph image link ??

 

I have tried the (to me) obvious: <!--@If Defined(ParagraphImageLink)-->

 

but it doesnt seem to work .. so hlp pls!


 

Not only that tag, but it seems many If Defined tags do not seem to work in paragraphs, like ParagraphImage

 

Regards,

Nuno

 
Reply
ddl@condurra.dk wrote:

Anyone .. How do I write the tag if defined: paragraph image link ??

 

I have tried the (to me) obvious: <!--@If Defined(ParagraphImageLink)-->

 

but it doesnt seem to work .. so hlp pls!


 

Hi

 

What about using the < ! --@If Defined(ParagraphImageClean)-- >, I seen to remember that the ParagraphImageLink always has some content.

 

/Allan

 
Reply
aak@pro2.dk wrote:
ddl@condurra.dk wrote:

Anyone .. How do I write the tag if defined: paragraph image link ??

 

I have tried the (to me) obvious: <!--@If Defined(ParagraphImageLink)-->

 

but it doesnt seem to work .. so hlp pls!


 

Hi

 

What about using the < ! --@If Defined(ParagraphImageClean)-- >, I seen to remember that the ParagraphImageLink always has some content.

 

/Allan


 

Hi again

I have just tried using it i my XSLT and has a problem if I just made a test. I had to do this:

 

 <xsl:if test="ParagraphImageClean !=''">
  <div class="topbillede"> 
    <img  alt="" >       
      <xsl:attribute name="src">
        <xsl:value-of select="ParagraphImageClean" disable-output-escaping="yes"/>   
      </xsl:attribute>     
    </img> 
  </div>
</xsl:if>

 
Reply

Hi Allan

 

You have to test for the string-length of the node.

 

Like this: test="string-length(ParagraphImageClean) != 0"

 

// Dammark

 
Reply
ddl@condurra.dk wrote:

Anyone .. How do I write the tag if defined: paragraph image link ??

 

I have tried the (to me) obvious: <!--@If Defined(ParagraphImageLink)-->

 

but it doesnt seem to work .. so hlp pls!


 

This seems to be a problem that depends on which version and/or server the solution is on.  I find that in some solutions the tag " If Defined(ParagraphImageClean) " works - and on others it does not!

 

 

 

You must be logged in to post in the forum