Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • trfletch 598 posts 604 karma points
    May 11, 2009 @ 14:50
    trfletch
    0

    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?

  • trfletch 598 posts 604 karma points
    May 12, 2009 @ 14:03
    trfletch
    0

    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

    May 12, 2009 @ 15:03

    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

  • trfletch 598 posts 604 karma points
    May 12, 2009 @ 15:59
    trfletch
    0

    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]

  • trfletch 598 posts 604 karma points
    May 13, 2009 @ 15:59
    trfletch
    0

    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.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    May 13, 2009 @ 16:24
    Douglas Robar
    0

    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.

  • trfletch 598 posts 604 karma points
    May 13, 2009 @ 16:34
    trfletch
    0

    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]

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    May 13, 2009 @ 16:46
    Douglas Robar
    0

    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.

  • trfletch 598 posts 604 karma points
    May 13, 2009 @ 16:58
    trfletch
    0

    Ok so I should be able to get it working by changing this:

    [code]

    [/code]

    and this:

    [code]
    [/code]

  • trfletch 598 posts 604 karma points
    May 14, 2009 @ 10:40
    trfletch
    0

    Can anyone offer any further advice on this because I really don't know where to start.

  • trfletch 598 posts 604 karma points
    Jul 22, 2009 @ 17:54
    trfletch
    0

    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?

  • trfletch 598 posts 604 karma points
    Jul 23, 2009 @ 13:40
    trfletch
    0

    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.

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Jul 23, 2009 @ 17:48
    Douglas Robar
    0

    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.

  • Atoosa Khoda 96 posts 148 karma points
    Apr 19, 2012 @ 03:03
    Atoosa Khoda
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft