All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Linking to parent of returned entry within listing

Doug Biggerstaff 3 Aug 2012 04:02 question, complete

Hello,
I'm using Search on a listing, for entries that exist only within a list, and have no page of their own.

On the Search results page, I'd like to link the returned entry title to the parent list's url, but am unable to determine the tag(s) to use.

I should add that I'm using Structure to manage the list, and have attempted to use Structure tags to link to the parent, but the structure tags are not being parsed.

I assume this is a parse order issue, but am unsure how to move forward.

I've looked through the forum - thinking this is not an unusual scenario - but have been unable to locate any direction.

Any thoughts on how to solve this?

Using EE v2.2.2 - Build: date 20110801
Low Search 2.0.3
Structure 3.0.3

Thanks very much!
Doug

Replies

  1. Low 3 Aug 2012 06:50

    You could just use a {path=""} variable to link those entries to whichever page you want. Remember, search results are just channel entries, and you can use any variable you can use with the native channel:entries tag.

  2. Doug Biggerstaff 3 Aug 2012 12:25

    Thanks Low,
    I need to link to a specific entry that contains the relevant list. Although each of the 9 parent lists is using the same template, the template alone is not adequate.

    The parent-child relationship is managed/defined within Structure. Is there a way to parse the Structure tag within the {exp:low_search:results} tag?

    I've looked at using an embed. Although my experience with them is weak - I try to avoid them - I don't think they'll work here as the result isn't known until the page is rendered. Or am I missing something?

    Thanks,
    Doug

  3. Low 3 Aug 2012 12:50

    You should be able to use any tag inside the low_search:results tag. Which Structure tag are you trying to use? What is the template code? You can use http://pastie.org for your larger code examples.

  4. Doug Biggerstaff 7 Aug 2012 12:21

    Thanks Low,
    It turns out that the structure tag won't help, as it is focused on the current page, which - of course - is a search result page, not a structure page.

    So back to my initial question - I believe the only way to relate the result to the listing that contains it is through categories. I'm going to try that approach, but is there another way to go about it that I'm not considering?

    The live site is - https://www.hralacarte.ca - if you search for 'Contract' you will receive 4 results, 3 of which are items in its parent listing - https://www.hralacarte.ca/index.php/h...

    Currently each of the 3 'Products' results links to the current result page.

    Thanks very much!
    Doug

  5. Low 7 Aug 2012 12:35

    I'm afraid I'm not familiar enough with Structure to offer a good solution. Maybe you can ask Travis and Jack about it: how to link to a listing page for a given entry. That should be applicable to the search results as well.