Hi I have an Umbraco 4 website and I am using a custom datatype to show Related Documents, the datatype is based on the Related Links datatype. It works well but the problem I have is that I want the related documents to appear in a search that uses the XSLT Search add on. The XSLT for displaying the related documents on the page is as follows:
[code]
[/code]
As you can see the property alias for the related links datatype is 'associatedmedia' I therefore thought that I may be able to get it to work by adding the following in the XSLT Search:
[code]
[/code]
but it does not seem to work, can anyone point me in the right direction or is this not possible?
Thanks for the response, I thought that it would be because the data is stored differently, I don't suppose you have any idea what the change would be? I assume it's not just going to be a case of adding something to
[code]searchFields="@nodeName,metaKeywords,metaDescription,bodyText"[/code]
Sorry to go on about this but just wondered if anyone knows what I would need to change in the XSLT search to make this work because I need to get back to someone to let them know if this is going to be possible.
Thank you for the response, at least it is possible although I think it might be a bit above my current XSLT knowledge, would I be right in thinking I need to modify this line?
You would only need to change that line if you are NOT passing in parameters to the macro itself, as should typically be done. This bit of code simply sets default values if none are passed in.
You're going to need to change a fair bit of logic to include the related items, but I think it will be isolated to setting the possibleNodes variable (and possibly the booleanAndMatchedNodes template).
This issue has come back to my attention, one of our customers has documents that are associated with pages using the Related Media datatype which is a modified version of Related Links, they want the documents that are attached in this way to show up in searches they do but the XSLT search does not pickup the documents. Can anyone help me find a way to modify the XSLT so that it will be able to search for documents that are attached in this way?
Any suggestions on this or am I just going to have to tell my customer that they cannot search for related documents? Can anyone suggest a different search facility maybe? I did try the newly released Umbraco Search 2 but this searchs for any documents that are in the media section regardless of if they are referenced on the website or not, plus this site has a members section so I wouldn't want everyone to be able to see all the documents on the site.
Feel free to contact me through my website (www.percipientstudios.com) and maybe I can give you a hand in modifying XSLTsearch for your client. As I said earlier, it is possible but it'll take a bit of work.
Hi, I have similar situation, except that mine is using uComponent multi node picker rather than relatedLinks data type. and that i have multiple node types to query for. relatedProducts, relatedIndustry, relatedSolutions. would this be possible with xslt search?
XSLT search for related documents (related links)
Hi I have an Umbraco 4 website and I am using a custom datatype to show Related Documents, the datatype is based on the Related Links datatype. It works well but the problem I have is that I want the related documents to appear in a search that uses the XSLT Search add on. The XSLT for displaying the related documents on the page is as follows:
[code]
[/code]
As you can see the property alias for the related links datatype is 'associatedmedia' I therefore thought that I may be able to get it to work by adding the following in the XSLT Search:
[code]
[/code]
but it does not seem to work, can anyone point me in the right direction or is this not possible?
Anybody got any suggestions on this one? Is it going to be possible or am I going to need an different type of search rather than the XSLT one?
Comment author was deleted
Hi Tony,
It should be possible to use xslt search but you'll have to make a small change.
Since the related links data is stored in link nodes
Hi Tim,
Thanks for the response, I thought that it would be because the data is stored differently, I don't suppose you have any idea what the change would be? I assume it's not just going to be a case of adding something to
[code]searchFields="@nodeName,metaKeywords,metaDescription,bodyText"[/code]
Sorry to go on about this but just wondered if anyone knows what I would need to change in the XSLT search to make this work because I need to get back to someone to let them know if this is going to be possible.
Hi, Tony,
This will require a code change to XSLTsearch. There's no way to handle it with the existing parameters. The code is quite well commented.
So, in answer to your last question... yes, it's possible! But it will take a bit of effort to do it.
cheers,
doug.
Hi Drobar,
Thank you for the response, at least it is possible although I think it might be a bit above my current XSLT knowledge, would I be right in thinking I need to modify this line?
[code]
[/code]
You would only need to change that line if you are NOT passing in parameters to the macro itself, as should typically be done. This bit of code simply sets default values if none are passed in.
You're going to need to change a fair bit of logic to include the related items, but I think it will be isolated to setting the possibleNodes variable (and possibly the booleanAndMatchedNodes template).
cheers,
doug.
Ok so I should be able to get it working by changing this:
[code]
[/code]
and this:
[code]
[/code]
Can anyone offer any further advice on this because I really don't know where to start.
Hi,
This issue has come back to my attention, one of our customers has documents that are associated with pages using the Related Media datatype which is a modified version of Related Links, they want the documents that are attached in this way to show up in searches they do but the XSLT search does not pickup the documents. Can anyone help me find a way to modify the XSLT so that it will be able to search for documents that are attached in this way?
Any suggestions on this or am I just going to have to tell my customer that they cannot search for related documents? Can anyone suggest a different search facility maybe? I did try the newly released Umbraco Search 2 but this searchs for any documents that are in the media section regardless of if they are referenced on the website or not, plus this site has a members section so I wouldn't want everyone to be able to see all the documents on the site.
Feel free to contact me through my website (www.percipientstudios.com) and maybe I can give you a hand in modifying XSLTsearch for your client. As I said earlier, it is possible but it'll take a bit of work.
cheers,
doug.
Hi, I have similar situation, except that mine is using uComponent multi node picker rather than relatedLinks data type. and that i have multiple node types to query for. relatedProducts, relatedIndustry, relatedSolutions. would this be possible with xslt search?
i have the full description of the scenario here our.umbraco.org/.../30929-advanced-search-on-nodes-relationship-
Any help is appreciated. Atoosa
is working on a reply...