expressionengine - URL title to Entry ID on Channel Entries tag -
i'm trying use "url title entry id" plugin feed entry_id parameter channel entries tag, can't figure out way id information inserted enough in template parsing order.
this doesn't work - picks no entry id, , displays entries:
{exp:channel:entries entry_id="{exp:url_title_to_entry_id parse="inward" url_title="{last_segment}"}" dynamic="no"} {title} {/exp:channel:entries}
any suggestions appreciated.
you can't have function tag parameter function tag.
so either have pass {exp:url_title_to_entry_id} result embed variable template holds channel:entries tag, or have use tag pairs 1 function tag, wraps other , uses variables.
url_title_to_entry_id doesn't allow tag pair, either use embed technique, or use add-on.
but, don't need add-on @ all...
{exp:channel:entries url_title="{last_segment}" dynamic="no"} {title} {/exp:channel:entries}
i'd suggest added required_entry="yes" , limit="1" , add {if no_results}...{/if} conditional inside. prevent outputting entries if can't find match.
Comments
Post a Comment