Doc2Form: How to show edit-macro in template only to member who created the document
Hi,
In my master template I have inserted the following macro in order to make the document editable for the frontend visitor. However, now the edit form shows up to every frontend visitor, but I only want it to show up to the member (if logged in) that has created the document using Doc2Form.
I save the member id in the field alias myMemberId.
I am newbie into templating and masterpages so my question is: Can somehow use an if statement to check if the user is logged in and the user has the same member id as the member id saved in the alias field myMemberId?
The macro is on the node that contains the document so the member id is on the document.
Doc2Form: How to show edit-macro in template only to member who created the document
Hi,
In my master template I have inserted the following macro in order to make the document editable for the frontend visitor. However, now the edit form shows up to every frontend visitor, but I only want it to show up to the member (if logged in) that has created the document using Doc2Form.
I save the member id in the field alias myMemberId.
I am newbie into templating and masterpages so my question is: Can somehow use an if statement to check if the user is logged in and the user has the same member id as the member id saved in the alias field myMemberId?
The macro is on the node that contains the document so the member id is on the document.
My macro:
Can I do someting like this:
...and what will the code inside the parenthesis be?
Regards,
Martin
is working on a reply...