How to exclude umbracoRedirect items being displayed in results
How can I exclude pages that have been redirected using "umbracoRedirect" from displaying in the search results?
<xsl:variable name="possibleNodes" select="$items/descendant-or-self::*[
@isDoc
and string(umbracoNaviHide) != '1'
and name() != 'ImageGalleryPhoto' <!-- Hide doctype from search -->
and string(umbracoRedirect) != '1'
and count(attribute::id)=1
and (umbraco.library:IsProtected(@id, @path) = false()
or umbraco.library:HasAccess(@id, @path) = true())
]"/>
How to exclude umbracoRedirect items being displayed in results
How can I exclude pages that have been redirected using "umbracoRedirect" from displaying in the search results?
The XML value stored against a page with umbracoRedirect (in this case a property called 'umbRedirect' contains a node ID, like so:
So, you need a check to make sure to exclude any page where that value exists, so something like:
Cheers,
- Drew
Hi JV,
I'd rewrite that whole expression as the following:
/Chriztian
Thanks Chriztian, that works perfectly! Cheers!
is working on a reply...