Thread

Filtering by category to create an custom url on search results page

November 22, 2017 3:45am

Subscribe [1]
  • #1 / Nov 22, 2017 3:45am

    verveuster

    31 posts

    Hi Is there a way to do this with native search of EE 3?

  • #2 / Nov 24, 2017 2:15pm

    MID's avatar

    MID

    163 posts

    I think you’ll need an add-on for this.

  • #3 / Nov 27, 2017 3:02am

    verveuster

    31 posts

    This is my solution:

    {exp:search:search_results}        
     {if channel_name == 'aktuelles'}
      
         <b><a href="http://{path=aktuelles/{categories}{category_url_title}{/categories}}/{entry_id}">{title}</a></b>
    
           <span class="small">in {channel}</span>
    
             {excerpt}
       
     {/if}
    {/exp:search:search_results}

ExpressionEngine News

#eecms, #events, #releases