How to exclude certain document type from the search result?
Hi,
We use XSLTSearch Version 3.0.4. There is a bug we found in our application. The search results shows the widgets that created by us. And once the link is clicked, the error page shows up since it is not a real page. It is just a widget on the page.
Please help me to exclude this document type or macro type from the search criteria so that it does not show on the search results.
<!-- reduce the number of nodes for applying all the functions in the next step -->
<xsl:variable name="possibleNodes" select="$items/descendant-or-self::*[
@isDoc
and string(umbracoNaviHide) != '1'
and count(attribute::id)=1
and (umbraco.library:IsProtected(@id, @path) = false()
or umbraco.library:HasAccess(@id, @path) = true())
]"/>
and then add a filter for your specific DocumentType aliases, e.g. if you need to hide a specific type:
<!-- reduce the number of nodes for applying all the functions in the next step -->
<xsl:variable name="possibleNodes" select="$items/descendant-or-self::*
[@isDoc and not(self::WidgetTypeAlias)]
[not(umbracoNaviHide = 1)]
[
umbraco.library:IsProtected(@id, @path) = false()
or umbraco.library:HasAccess(@id, @path) = true()
]
]"/>
I think that you should mark this topic as solved so other people how gets the same question can see what worked for you, and go directly to the solution. Since you are new to our I can explain to you how you can mark a question as solved. it.
For each post you have a green tick, so to mark the question as solved you just find the post that gives you the correct answer, to solve your problem and just clik this little green tick on that post. Be aware that you only can mark one post as the correct answer to your question.
How to exclude certain document type from the search result?
Hi,
We use XSLTSearch Version 3.0.4. There is a bug we found in our application. The search results shows the widgets that created by us. And once the link is clicked, the error page shows up since it is not a real page. It is just a widget on the page.
Please help me to exclude this document type or macro type from the search criteria so that it does not show on the search results.
Thanks a lot,
Pdong
Hi Peng and welcome to our,
I think I found something that you help you to solve your issue. Have a look at the forum thead with the same subject.
http://our.umbraco.org/forum/developers/xslt/3629-exclude-document-type-from-xsltsearch
Doug also written a blogpost about how to customizing xsltsearch for specific needs. This blogpost can be found here: http://blog.percipientstudios.com/2009/4/7/customizing-xsltsearch.aspx
Hope this helps you,
/Dennis
Hi Pdong,
You need to find the lines that look like this:
and then add a filter for your specific DocumentType aliases, e.g. if you need to hide a specific type:
/Chriztian
Thanks a lot guys! I did find the old posts and resolved it by following the posts!
Hi Peng,
Awesome that you managed to get it work.
I think that you should mark this topic as solved so other people how gets the same question can see what worked for you, and go directly to the solution. Since you are new to our I can explain to you how you can mark a question as solved. it.
For each post you have a green tick, so to mark the question as solved you just find the post that gives you the correct answer, to solve your problem and just clik this little green tick on that post. Be aware that you only can mark one post as the correct answer to your question.
/Dennis
Thank Dennis, I just selected your post as a solution. :-)
is working on a reply...