Only showing link to edit form for author
Posted: 27 May 2008 04:53 AM   [ Ignore ]
Newbie
Rank
Total Posts:  7
Joined  2005-05-03

Looked around and didn’t see an answer. Maybe I was looking in the wrong place.

I have an EE SAEF and an edit form using form helper, nice. I also know I can place a link inside the weblogs to allow people to edit, like so:

{if logged_in_group_id == "1" || logged_in_group_id == "6"}<a href="{permalink='path_to/edit_form'}">Edit Entry</a>{/if}

Which I use with the

{if member_not_author}

But it would be better to show this link only to the author, wouldn’t it? Not to tempt everyone to click and then get a page with the “Sorry, only the author can edit”. We all know temptation is bad!

So can this be done? Or is there another option?

Profile
 
 
Posted: 27 May 2008 06:00 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

krim,

Try this instead smile

{if logged_in_member_id == "{author_id}"}<a href="{permalink='path_to/edit_form'}">Edit Entry</a>{/if}

 Signature 
Profile
 
 
Posted: 27 May 2008 06:11 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  7
Joined  2005-05-03

That was so painfully obvious! And I even used that in the SAEF, should have known.

That’s why you are the pie man!

Profile
 
 
Posted: 27 May 2008 06:23 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

haha LOL

 Signature 
Profile