[Zope] How to edit manage_page_footer?

Phil Harris phil@harris-family.info
Wed, 10 Apr 2002 16:34:12 +0100


I'm surprised no-one else has mentioned this, but:

Make a monkey-patch of it.

That way you won't need to re-install the changes whenever you upgrade zope
(until they change to Page Templates anyway).

Here's how to do it:

1.    Create a directory in <zopedir>/lib/python/Products, call it
new_manage_page_footer
2.    In this folder create a file called __init__.py with these contents:

        <code>
        from App.Management import Navigation
        from Globals import DTMLFile

        manage_page_footer=DTMLFile('manage_page_footer', globals())

        Navigation.manage_page_footer=manage_page_footer
        </code>

3.    Also in this folder create a file called manage_page_footer.dtml, with
these contents:

        <!-- start dtml code -->
        <p>This is a message to prove that I've changed</p>
        </body>
        </html>
        <!-- end dtml code -->

4.    restart zope

That's it, you can make whatever changes you need to the
manage_page_footer.dtml file, including some dtml stuff if you need it.

hth

Phil

----- Original Message -----
From: "Peter Bengtsson" <mail@peterbe.com>
To: "Joshua Newman" <lazernewman@yahoo.com>; "Zope Users" <zope@zope.org>
Sent: Wednesday, April 10, 2002 4:02 PM
Subject: Re: [Zope] How to edit manage_page_footer?


> On Tuesday 09 April 2002 07:24, Joshua Newman wrote:
> > How can I put a button or a link  that allows a newbie manager to return
to
> > the site from the management interface?
>
> Edit the source of Zope.
> Look in <z>/lib/python/App/dtml/ and <z>/lib/python/OFS/dtml/
>
> Be subtle by only adding something like this:
>
> <dtml-if my_instance_special_footer>
> <dtml-var my_instance_special_footer>
> </dtml-if>
>
> And then create a DTML Method somewhere in Zope (not necessarily the root)
> with id my_instance_special_footer that looks something like this:
>
> <a href="<dtml-var "_.string.replace(URL, '/manage','')">">Exit Management
> Interface</a>
>
> >
> >
> >
> > I tried adding my own 'manage_page_footer' to the subdirectory, but
> > zope won't let me do that.
> >
> > Any ideas?
> >
> > Joshua
> >
> >
> >
> > _______________________________________________
> > Zope maillist  -  Zope@zope.org
> > http://lists.zope.org/mailman/listinfo/zope
> > **   No cross posts or HTML encoding!  **
> > (Related lists -
> >  http://lists.zope.org/mailman/listinfo/zope-announce
> >  http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )