PyLucid CMS Logo

About the plugin internal pages.

↑ 'internal pages' definition  #

Plugins create normally parts of the CMS page. For these outputs a plugin can use the django template engine. These templates generates not complete html pages, but only a small part of it.
We called these plugin template 'internal pages'. See also PyLucid related terms and definitions

We are looking for a better/shorter name for "internal pages", see forum discussion

↑ additional Stylesheet/JavaScript  #

Every internal page can have additional Stylesheet and/or JavaScript files. These files are optional.

The CSS/JS files would be automatic include with <link href=...> and <script src=...> if the internal page are used. (new in dev. version)

↑ structure  #

The internal page stored into the PyLucid media path, e.g.:

The additional .css/.js files must be exactly the same name like the internal page file, e.g.:

To use the internal page for building a output via the django template engine, the plugin must only do that:

Python
1
2
3
4
5
6
7
class page_admin(PyLucidBasePlugin):
    def edit(self):
        ...
        context = {...}
        # Render the context with the django template engine and put the result
        # into the cms page content:
        self._render_template("edit_page", context)

↑ i18n  #

There is no need for inserting . We always activate "i18n" via add_to_builtins()

↑ debug  #

The method _render_template has a debug parameter, e.g.:

Python
1
self._render_template("edit_page", context, debug=True)
0 comments for 'internal pages':
    there exist no comment for 'internal pages'
Leave a comment

django-processinfo: 5.1 ms of 389.4 ms (1.3%)