Answer the question
In order to leave comments, you need to log in
How to check an additional property for emptiness?
Hello,
I am making a site on hostCMS 6
created an IS (information system), in it an additional field called dop_url, ticked so that 1 IS element has one additional field
How do I do a type check:
if(dop_url == ''){
// делаю что то
}
if(dop_url != ''){
// делаю что то другое
}
<xsl:choose>
<xsl:when test="property_value[tag_name='dop_url']/value != ''">
<!--Делать что то -->
</xsl:when>
<xsl:when test="property_value[tag_name='dop_url']/value == ''">
<!--делать что то другое -->
</xsl:when>
</xsl:choose>
Answer the question
In order to leave comments, you need to log in
Solution:
<xsl:choose>
<xsl:when test="property_value[tag_name='dop_url' and value != '']">
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question