Have wiki markup fragment config options, to be inserted at specific point in the theme

Sometimes I wish to have the possibility to setup a wiki macro in wikiconfig to be called by a theme for example in the footer. This could be done by using the MacroMarket/MiniPage macro e.g.

in wikiconfig.py

page_footer2 = '[[Hits]]'

#format python

 def footer(self, d, **keywords):
        """ Assemble wiki footer
        
        @param d: parameter dictionary
        @keyword ...:...
        @rtype: unicode
        @return: page footer html
        """
        self.request.formatter.page = d["page"]
        
        Parser = wikiutil.importPlugin(self.request.cfg, 'parser', 'wiki', 'Parser')  
        
        MP = Parser("[[MiniPage(%(text)s)]]" % {"text":self.cfg.page_footer2}, self.request).format(self.request.formatter)
       
        page = d['page']
       
        html = [
            # End of page
            self.pageinfo(page),
            self.endPage(),
            
            # Pre footer custom html (not recommended!)
            self.emit_custom_html(self.cfg.page_footer1),
            
            # Footer
            u'<div id="footer">',
            self.editbar(d),
            self.credits(d),
            self.showversion(d, **keywords),
            u'</div>',
            
            # Post footer custom html
            #self.emit_custom_html(self.cfg.page_footer2),
            self.emit_custom_html(str(MP)),
            ]
        return u'\n'.join(html)

With something like MacroMarket/MiniPage, Action it would be possible to implement extensions in a theme from within a configuration file. -- ReimarBauer 2005-10-22 17:04:14

My idea is to completly move the outer frame (which is mostly generated in the theme currently, including navibar) into separate pages and render them instead of calling theme code. In that case, changing the theme would be much simpler for the user. -- AlexanderSchremmer 2005-10-22 18:33:09

You can't replace the outer frame, but the navigation, editbar, search and user links. This will not work for modern like theme, but will work very nicely with a sidebar theme like this:

|----------------------------------------------------------------------|
| Logo, sitename                                           login stuff |
| ---------------------------------------------------------------------|
| Add  Edit    | Edit  Info  Attachment  More...                       |
| ---------------------------------------------------------------------|
| search:      | TITLE                                                 |
| [          ] |                                                       |
|              | page content...                                       |
| navigation:  |                                                       |
| ...          |                                                       |
|              |                                                       |
| My Pages:    |                                                       |
| ...          |                                                       |
|----------------------------------------------------------------------|
| Footer stuff                                                         |
|----------------------------------------------------------------------| 

You can see the basic layout in AccessibleHtmlLayout.

Similar functionality is found in MoinMoinPatch/ParsedInBodyHeaderFooter, though this is still very different from what you're looking for. -- MaxCampos 2006-09-16 07:41:51


CategoryFeatureRequest

MoinMoin: FeatureRequests/ThemeFooterAddMacroCallsFromWikiConfig (last edited 2007-10-29 19:20:59 by localhost)