So I am trying to display channel entries from three different channels in an unordered list by comment_total which isn’t a problem. The problem is each set of entries is displayed in a different template group, so creating the link to each entry is proving difficult.
{exp:channel:entries channel="posts|guides|news" limit="5" orderby="comment_total" status="featured|open" dynamic="off"}
<li><a href="http://{url_title_path=}">{title}</a><span>{entry_date format="%M %d, %Y"}</span>
{/exp:channel:entries}My original thought was to simply use the channel as a conditional variable so
{if channel == "posts"}{url_title_path="posts/"}{/if}But that didn’t seem to work and I haven’t seen anywhere where channel is used as the variable in an if statement, so I assume that is not allowed. My second idea was to create a custom field for each entry and use that as the variable but I don’t really want to have to go into every entry and do that. I guess my other option would be to display all the entries in the same template group, but that would create duplicate locations and other headaches I would rather not deal with.
Is there another way to do this I am not thinking of, is this not possible, or am I just doing it wrong.