equal
deleted
inserted
replaced
1 =============== |
1 ====================== |
2 PyAMS Templates |
2 PyAMS_template package |
3 =============== |
3 ====================== |
|
4 |
|
5 .. contents:: |
|
6 |
|
7 |
|
8 What is PyAMS |
|
9 ============= |
|
10 |
|
11 PyAMS (Pyramid Application Management Suite) is a small suite of packages written for applications |
|
12 and content management with the Pyramid framework. |
|
13 |
|
14 **PyAMS** is actually mainly used to manage web sites through content management applications (CMS), |
|
15 see PyAMS_content package), but many features are generic and can be used inside any kind of web |
|
16 application. |
|
17 |
|
18 |
|
19 What is PyAMS_template ? |
|
20 ======================== |
|
21 |
|
22 PyAMS is using Chameleon internally as HTML templates engine. |
|
23 |
|
24 This package, which is essentially an adaptation of "z3c.template" package for Pyramid, allows to |
|
25 separate the definition of a view and of it's template; this template selection can actually be |
|
26 based on the view but also on the request layer (see "PyAMS_skin" package to get more information |
|
27 about layers). |
|
28 |
|
29 PyAMS_template package provides a "template_config" decorator, which allows you to define a template |
|
30 for a given view, and a "layout_config" decorator, which allows to define a "layout" template; |
|
31 layout templates are particularly useful when using "pagelets", which are defined into another |
|
32 package (see PyAMS_pagelet). |
|
33 |
|
34 You can also override a template definition for a given view, without creating a new view class, |
|
35 just by using the "override_template" or "override_layout" functions. |
|
36 |
|
37 View and layout templates can also be declared using ZCML instead of Python code, by using the |
|
38 <template /> and <layout /> directives. |