[Zope] 'Edit This Page' ... a simple solution

Amos Latteier amos@aracnet.com
Thu, 14 Oct 1999 09:58:07 -0700


At 08:14 AM 10/14/99 -0700, David Robson wrote:

[standard_html_footer to allow document editing]

><p><!--#var ZopeAttributionButton--></p>
><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
><font size="-1">
><a href="manage_main">Edit page</a> (password
>required).</font>
><BR><BR></BODY></HTML>
>
>This will put an 'Edit page' link on the bottom of
>each page, but the link will normally not be seen
>because the many <BR> line breaks will push the link
>below the bottom of the screen. Editors will be
>instructed to scroll down to find the link. When an
>editor clicks on the link she will be instructed to
>enter her name and password before gaining management
>access to the content pages. 

If you're dealing with a case where the editors have already logged in. You
can simply hide the edit link from non-editors.

<dtml-if "AUTHENTICATED_USER.has_role('Editor', this())">
<a href="manage_main">Edit page</a>
</dtml-if>

This says, if the web user has the role of Editor on the current DTML
Document, then show a link to edit the document.

Note: that the link won't show up for anonymous users. So your editors have
to authenticate themselves in someway before the links will show up.

-Amos