[Moin-user] Moin and frames layout

bragiba at simi.is bragiba at simi.is
Mon Oct 21 08:52:04 EDT 2002

That´s great that you can have callable objects in your title and page
This did not quite satisfy what I was after though :(.  So I went the route
1. grabbing a java menu off (www.apycom.com)
2. Create a custom_navi_bar in config.py in the deault dict.
     custom_navi_bar is just html code that the user can fill in to create
a custom navi_bar.
3. I then set the navi_bar to an empty list and I print out the custom navi
bar if it exists in send_title in wikiutils.py
    if config.navi_bar or quicklinks:
        print (
            '<table class="navibar" cellpadding=0 cellspacing=3 border=0>'
            '<tr><td class="navibar" valign=top align=center bgcolor="
            '<font class="navibar" face="Arial,Helvetica" size="-1">
 <b>%(sitename)s</b> '
            '</font></td>') % {'sitename': config.sitename,}

        if not quicklinks:
            for pagename in config.navi_bar:

        for pagename in quicklinks:
            print (
                '<td class="navibar" valign=top align=center bgcolor="
                '<font class="navibar" face="Arial,Helvetica" size="-1">'
                ' <a class="navibar" href
="%(scriptname)s/%(pagelink)s">%(pagename)s</a> '
                '</font></td>') % {
            'scriptname': webapi.getScriptname(),
            'pagelink': quoteWikiname(pagename),
            'pagename': pagename,

        print '</tr></table>'
    if config.custom_navi_bar:                                    #Print
out custom navi bar.
        print config.custom_navi_bar

4. My suggestion is to also rename page_footer1 and title1 to custom_footer
and custom_header.  These are a little
     more descriptive names.

5. My  only problem now is that some of my menu items call some scripts,
i.e. /bin/somescript.cgi that stand outside moin.
     These scripts return fullblown html pages.   So ideally I would have
liked to have moin organized into frames.
     The navi bar and header contents are one frame (navi_frame) and then
the rest is  just a display frame (display_frame).
      In that way I can redirect the output of my scripts into the display
frame.   That way the user still sees the moin navi_bar and
      he feels like he is still a part of the moin environment.
      For now I am just popping up a new window to display the script

I am thinking about rewriting moin for my purposes with frames but I am not
quite sure how big of a task that is yet.

So can you answer these:

What are the downsides to using frames in moin?
What do you see as the positives of using frames?

My first guess is to do the following:
Instead of having moin throw everything right at stdout it throws it at
some object that knows if you are using frames or not
and takes the appropriate action.

Með kveðju/Best Regards
Bragi Baldursson
GPRS Kerfisverkfræðingur/GPRS Systems Engineer
Sími/Tel.:  +354 550 63 08    mailto:bragiba at siminn.is
Fax:  +354 550 63 39    www:http://www.siminn.is
Gsm:   +354 892 63 08

- Síminn auðveldar samskipti -

                    Tim Bird                                                                                  
                    <tbird20d at yah        To:     bragiba at simi.is                                              
                    oo.com>              cc:     MoinMoin Users <moin-user at lists.sourceforge.net>             
                                         Subject:     Re: [Moin-user] Moin and frames layout                  
                    respond to                                                                                

bragiba wrote:
> Are you saying callbacks are in CVS now?

Juergen Hermann wrote:
> > Or you just do a cvs up.


Juergen, That's what I call service!!  Thanks.

Instructions to access the CVS repository are at:

use "MoinMoin" as the modulename, and look in the
file wikiutil.py, at routine _emit_custom_html()

Juergen, it looks like in the future you are planning
on passing in a request object as a parameter to the
function.  This would be very handy to allow the callback
to customize the output according to request attributes.
Is this right?  I see that this would break a bunch of
action code, is this why you didn't put this in now?


Tim Bird

Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site

Þessi tölvupóstur og viðhengi hans gætu innihaldið trúnaðarupplýsingar
eingöngu ætlaðar þeim sem hann er stílaður á. Efni tölvupóstsins og
viðhengi er á ábyrgð sendanda ef það tengist ekki starfsemi Símans.
Sjá nánar: http://www.siminn.is/control/index?pid=6164

This e-mail and its attachments may contain confidential and privileged
information only intended for the person or entity to which it is
Further information: http://www.siminn.is/control/index?pid=6772

More information about the Moin-user mailing list