UPDATED BELOW IN REPLY
Hi, kids…
I’m trying to display an “Edit Entry” link only to the author, and it’s turned out to be tricky.
I also want to use a conditional that will display the entry if 1) the author has marked it for Sharing, or 2) the logged in member is the author.
I’ve read about this problem.
author_id=={member_id}doesn’t work within entries pairs. I’ve also read about the Alternate Syntax, and I’ve tried conditionals involving author_id, member_id, logged_in_member_id, CURRENT_USER, etc., but no joy so far… The link appears for every member. And it looks like the entry will appear to everyone whether Shared or not.
Below,
field_id_92field_id_93is the contents being displayed.
Here’s the non-functioning code (although the if field_id_92==“Yes” part does apparently work):
{exp:weblog:entries weblog="weblog_name" show_expired="yes" rdf="off" limit="1"}
{if field_id_92=="Yes" OR author_id=={member_id}}Site Title :
{exp:member:custom_profile_data}{first_name} {last_name}
{/exp:member:custom_profile_data} Page title
{if author_id=={member_id}} [ EDIT this Entry ]
{/if}
(Field description):
{field_id_93} (Entry contents)
{if:else}This member has not chosen to make this entry public.{/if}{/exp:weblog:entries}Incidentally, if I replace member_id with logged_in_member_id, I get a blank page. Otherwise, everything displays to all members.
Anyone?
TIA as always!