Copied to clipboard

Flag this post as spam?

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


  • James Davies 3 posts 73 karma points
    Aug 16, 2016 @ 02:02
    James Davies
    0

    Finding the pages where a node is referenced in a sub directory

    Hi,

    I am trying to run a search that finds all the pages, that has a link to a specific node. For example I want to find every page that contains a link to the home page. I also want to make the search specific to a certain directory, so in this case my directory is called sessions. Can anyone advise the best way of doing this. I have examine set up also but couldnt find a suitable solution.

    Thanks

  • Robert Foster 459 posts 1820 karma points MVP 3x admin c-trib
    Aug 16, 2016 @ 02:26
    Robert Foster
    0

    Hi James,

    Do you mean the link to the specific page is in a Rich Text Editor, or is it by way of a Content Picker or something like that?

    If you're doing via a Content Picker then you can create an Event Handler to add extra indexed data to the Examine Index as the content node is being published.

    In this way, you could for example create an indexed field that specifically contains the node name in addition to the node Id which would allow you to set up your search criteria as you want.

    If you're trying to find content that creates links to a certain node in say a Rich Text field, then it's a little more complicated, but you may be able to find a way forward.

    I don't have time right now to come up with some sample code, but there are plenty of examples around about custom indexing etc.

    Hope this helps,

    Rob.

  • James Davies 3 posts 73 karma points
    Aug 16, 2016 @ 02:32
    James Davies
    0

    awesome thanks for the insight rob, ill try write some code and upload my solution

Please Sign in or register to post replies

Write your reply to:

Draft