I have a template which contains a playa field and allows the admin to pull entries from several channels in to a kind of showcase.
I need these showcase entries to then link to the correct template, and each channel has its own set of templates.
Is there a tag that I don’t know (similar to the auto_path and comment_auto_path tags) about that can use the channel path or search results url to build a link? Otherwise I’m going to have to write a big chunk of conditionals ({if channel_short_name=="x"}...{if:elseif}...) etc… which is fine, but seems long-winded.
Any tips much appreciated. I am using the structure module too, but all of these entries are lists, not pages, and I don’t think structure has a tag that will do this either.
Essentially, if I have ‘news’ and ‘views’ channels, I want to be able to do this:
{exp:channel:entries channel="news|views" limit="1"}
{playa_field}
<a href="http://{magic_auto_path}">{title}</a>
{/playa_field}
{/exp:channel:entries}