Tags on media/page still being sourced from recycle bin
Hi Umbracees,
Here's a small snippet of the offending xslt macro.
<!--Get our page's tags -->
<xsl:variable name="pageTags" select="umbraco.library:Split($currentPage/tags, ',')" /> <xsl:variable name="matchingTagsList"> <xsl:for-each select="umbraco.library:GetMedia(1358, 1)/*"> <!--1358 is the id of the media folder which holds the resources --> <xsl:variable name="resourceTags" select="umbraco.library:Split(current()/tags, ',')" /> <!-- If my resource contains my page's tags then render it --> <xsl:choose> <xsl:when test="$pageTags//value = $resourceTags//value"> <xsl:value-of select="current/@id" /> <xsl:text>,</xsl:text> </xsl:when> <xsl:otherwise></xsl:otherwise> </xsl:choose> </xsl:for-each> </xsl:variable>
After deleting a media resource which has tags, those tags are still being referenced to the tag cloud/search from the recycle bin. Now before you say 'just delete the recycle bin' - which is a perfectly reasonable solution - The customer only has authoring permissions and I don't want to hear every hour that they want the recycle bin deleted when they've changed their media. If the media has been removed from the folder/page referenced then surely it shouldn't show. Is there any way I can ensure that the media/page being referenced doesn't exist in the recycle bin? Or perhaps some other solution that achieves the same result.
Tags on media/page still being sourced from recycle bin
Hi Umbracees,
Here's a small snippet of the offending xslt macro.
<!--Get our page's tags -->
<xsl:variable name="pageTags" select="umbraco.library:Split($currentPage/tags, ',')" />
<xsl:variable name="matchingTagsList">
<xsl:for-each select="umbraco.library:GetMedia(1358, 1)/*"> <!--1358 is the id of the media folder which holds the resources -->
<xsl:variable name="resourceTags" select="umbraco.library:Split(current()/tags, ',')" />
<!-- If my resource contains my page's tags then render it -->
<xsl:choose>
<xsl:when test="$pageTags//value = $resourceTags//value">
<xsl:value-of select="current/@id" />
<xsl:text>,</xsl:text>
</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
After deleting a media resource which has tags, those tags are still being referenced to the tag cloud/search from the recycle bin. Now before you say 'just delete the recycle bin' - which is a perfectly reasonable solution - The customer only has authoring permissions and I don't want to hear every hour that they want the recycle bin deleted when they've changed their media. If the media has been removed from the folder/page referenced then surely it shouldn't show. Is there any way I can ensure that the media/page being referenced doesn't exist in the recycle bin? Or perhaps some other solution that achieves the same result.
Any help would be appreciated. Cheers.
is working on a reply...