scripts/wiki-lenny/macro/ShowCategories.py
Antoine Durand-Gasselin 5f26116790 [wiki] dans scripts il n'y a que les macros
On peut donc ranger tout ça différamment

darcs-hash:20090427172846-bd074-e5e593492feb22017bf9d141c14fdca91c3104da.gz
2009-04-27 19:28:46 +02:00

16 lines
480 B
Python

# -*- coding: utf-8 -*-
#
# SHOWCATEGORIES.PY--
#
# Copyright (C) 2008 Antoine Durand-Gasselin
# Author: Antoine Durand-Gasselin <adg@crans.org>
#
def execute (macro, text):
f = macro.formatter
code = [f.heading(1,2), "Liste des liens", f.heading(0,2)]
code += macro.request.page.getPageLinks(macro.request)
code += [f.heading(1,2), u"Liste des Catégories", f.heading(0,2)]
code += macro.request.page.getCategories(macro.request)
return "\n".join(code)