Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hi all,
please help me, I have a question about search xslt
if node's have title name but content is empty ,I want to no display is search result
how can I change search xslt ,
thanks
regards
devsteven
I guess you'll just need to add an extra <xsl:if> statement that checks whether the property's value is not empty
<xsl:if test="string(./data [@alias = 'propertyAlias'] != ''"> <xsl:value-of select="./data [@alias = 'propertyAlias']" /> </xsl:if>
Hope this helps.
Regards,
/Dirk
Hi Dirk,
but I don't know how can I add this code in search xslt, could you Say it specific,
thank you very much
<xsl:variable name="search"> <xsl:choose> <!-- querystring value, if present --> <xsl:when test="string(umbraco.library:RequestQueryString('search')) != ''"> <xsl:value-of select="ps:escapeSearchTerms(string(umbraco.library:RequestQueryString('search')))" /> </xsl:when> <!-- form field value, if present --> <xsl:when test="string(umbraco.library:RequestForm('search')) != ''"> <xsl:value-of select="ps:escapeSearchTerms(string(umbraco.library:RequestForm('search')))" /> </xsl:when> <xsl:when test="string(./data [@alias = 'propertyAlias']) != ''"> <xsl:value-of select="./data [@alias = 'propertyAlias']" /> </xsl:when> <!-- no value --> <xsl:otherwise> <xsl:value-of select="''"/> </xsl:otherwise> </xsl:choose> </xsl:variable>
I try it ,but still display when node's content is empty, please help me,
thang you ,
is it empty or is it null?
it is have node titie ,but content is null,
I don't know how to filter this condition ,could you help me
regards,
no body can help me ?
is working on a reply...
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.
Continue discussion
how to change search xslt when content is empty
hi all,
please help me, I have a question about search xslt
if node's have title name but content is empty ,I want to no display is search result
how can I change search xslt ,
thanks
regards
devsteven
I guess you'll just need to add an extra <xsl:if> statement that checks whether the property's value is not empty
Hope this helps.
Regards,
/Dirk
Hi Dirk,
but I don't know how can I add this code in search xslt, could you Say it specific,
thank you very much
Regards,
devsteven
I try it ,but still display when node's content is empty, please help me,
thang you ,
devsteven
is it empty or is it null?
it is have node titie ,but content is null,
I don't know how to filter this condition ,could you help me
regards,
devsteven
no body can help me ?
is working on a reply...
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.