0

I have a simple search form. When the results are displayed, it doesn't show the template group / template in the URL. It shows just the entry URL. I'm using the {auto_path} variable. I realize I could go into each channel and change the URL, but is there an easier way?

{exp:search:search_results switch="resultRowOne|resultRowTwo"}

<tr class="{switch}">
    <td width="30%" valign="top"><b><a href="{auto_path}">{title}</a></b></td>
    <td width="30%" valign="top">{excerpt}</td>
    <td width="10%" valign="top">{entry_date format="%m/%d/%y"}</td>
</tr>

{/exp:search:search_results}
0

No, there's not an easier way, however in the sites I've built I don't usually mess with the channel path settings. Instead I usually use a conditional based on the channel short name to form the search results and link. Keep it all in the template, ya know?

|improve this answer|||||
  • Not sure what you mean. Could you explain a little bit more? – The Hawk Jan 6 '16 at 23:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.