Here a little documentation about the output from plugins...

page_msg - give feedback

(A little outdated, see: page_msg changes)

A plugin can response feedback to the users via the PyLucid page_msg function. The output can be simple colored and the functin is good for debugging.

The using is very easy. Here some example:

# Output in geen:"Something was done, ok.")

# Output in red, for error messages:"Something failed!")

# Without a color, the output is blue:
self.page_msg("These line is blue...")

# ...and we have a black color, too:"...and this line is black.")

The sourcecode of the page_msg object can be found here:

The output displayed via a simple django template "for loop". The output stored in the template context variable 'messages'. It's a simple list with every line of the output.
In the global template sould be exist something like this:

page title

A plugin can change the page title with:

from django.utils.translation import ugettext as _


# Change the global page title: 
self.context["PAGE"].title = _("A new page title")

With changeset 1532 the page title would be automatic changes in every _command url. But only, if the plugin doesn't change the title themself.

Note: There should not exists a headline in the internal pages for a "page title replacement".

custom output via the CSS anchor

Every Plugin output are surrounded with a CSS anchor. At the moment we add a DIV tag around every plugin output in ./PyLucid/template_addons/

The function add_css_tag() can be found here: ./PyLucid/system/

There exist a black list (CSS_TAG_BLACKLIST) in Because Plugins how only insert a link into the page, should not have a Tag around the link. At the moment the blacklist looks like:

CSS_TAG_BLACKLIST = ("page_style", "RSSfeedGenerator",)