summaryrefslogtreecommitdiff
path: root/docs/tutorials/cmf/skins.rst
blob: 549fb46217106da105c4252f2de4636c60e42407 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.. _skins_chapter:

=====
Skins
=====

In CMF, a "skin layer" is defined as a collection of templates and
code (Python scripts, DTML methods, etc) that can be activated and
deactivated within a particular setup.  A collection of active "skin
layers" grouped in a particular order forms a "skin".  "Add-on" CMF
products often provide skin layers that are activated within a
particular skin to provide the site with additional features.

To override static resources using a "search path" much like a set of
skin layers, :mod:`repoze.bfg` provides the concept of
:term:`resource` overrides.  See :ref:`overriding_resources_section`
for more information about resource overrides.

While there is no analogue to a skin layer search path for locating
Python code (as opposed to resources), :term:`view` code combined with
differing :term:`request type` attributes can provide a good deal of
the same sort of behavior.  See
:ref:`using_an_event_to_vary_the_request_type` for more information.

Relatedly, the `repoze.bfg.skins
<http://svn.repoze.org/repoze.bfg.skins/>`_ package is an attempt to
allow directories on disk to represent collections of views simply by
adding templates to the directory.