new to theme modifying and need help
greg <[email protected]> Sun, 17 Apr 2005 08:54:44 -0400
| Newsgroups | gmane.comp.web.wiki.moin.devel |
|---|---|
| Message-ID | <[email protected]> |
I've been using the sincor4moin theme I got from the ThemeMarket and I
want to make what seems like a very small modificaiton. Right now
there is a panel in the left side bar. It has the "Edit", "Get Info",
and the More Actions pull down. I want to add a "Attachments (#)"
where # is the number of attachments.
It looks like this panel is formed in Theme.editbar. Just working by
example, I added.
add(link(request, quotedname + '?action=3DAttachFile',
_('Attachments', formatted=3DFalse)))
So far, so good. I have "Attachments" text in the sidebar. Now how
do I get the number of attachments? I thought I could use a method of
the page objects to get a list of attachments or something similar,
but couldn't find anything promising. Looking around the source code,
II found text like "%s(attach_count)s" that looks promising but I
haven't figured out quite how to use it. Do I pass this to a function
that decodes it or does it go in the return of editbar and get decoded
downstream?
Any help is appreciated. Thanks for MoinMoin. So far it looks great
-- clean with hidden and exensible power. Well it's python.
Thanks,
Greg
BTW, in case it's not the convention for themes, the context for the
snippet above is:
_ =3D self.request.getText
link =3D wikiutil.link_tag
links =3D []
add =3D links.append
items =3D '\n'.join(['<li>%s</li>' % item for item in links if item !=3D '=
']
html =3D u'<ul class=3D"editbar">\n%s\n</ul>\n' % items
return html
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click