We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49637
    • 10 Posts
    Hello everybody,

    I have a news page (parent-page), on which the individual news items are issued via getRessources. These news are not linked to a child-page, they are all exclusively issued on the news page.

    In addition I use Simple Search on this website. If I search for a term, and this appears in a resource that is shown via getRessources on the news page, SimpleSearch linkes to the child-page. Since no template is defined for this child-page, a blank page is displayed.

    Is it somehow possible to edit SimpleSearch, so that the links will refer to the news page (parent-page) if a search result would be in a child-page?

    Greetings

    Steffen

    This question has been answered by sottwell. See the first response.

    • discuss.answer
      One solution would be to put the individual news items in a specific template, and at the top of that template put a snippet to redirect to the parent (news) page. You could even improve that a bit by making each news item an anchor, and in the snippet add the anchor to the parent URL so that the redirect would go directly to that item on the main news page.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 4172
        • 5,888 Posts
        you could create a plugin (onDocFormSave) which would fill the content of your news-page with your rendered news-items and exlude the news-items from simpleSearch.
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 49637
          • 10 Posts
          Thanks, Susan! This is the trick!