source: products/quintagroup.zopeskel.blayer/trunk/quintagroup/zopeskel/blayer/README.txt @ 1536

Last change on this file since 1536 was 1536, checked in by mylan, 14 years ago

#127: Added tests

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1browserlayer archetype sub-template
2===================================
3
4The browserlayer sub-template allows you to extend package, created with
5archetype zopeskel template.
6
7So, first create archetype base package:
8
9    >>> paster('create -t archetype plone.example --no-interactive --overwrite')
10    paster create -t archetype plone.example --no-interactive
11    ...
12
13Go into the package and check presence of *interfaces* and *profiles* directories
14
15    >>> cd('plone.example','plone','ploneexample')
16    >>> ls('.')
17    README.txt
18    ...
19    interfaces
20    ...
21    profiles
22    ...
23
24Now verify if interface/__init__.py contains IPloneExample browser layer interface,
25and there is no profiles/default/browserlayer.xml section in default generic setup
26profile.
27
28     >>> cat('interfaces/__init__.py')
29     # -*- extra stuff goes here -*-
30     <BLANKLINE>
31
32
33Check that there is no browserlayer.xml present in the default profile
34
35    >>> cat('profiles', 'default', 'browserlayer.xml')
36    No file named profiles/default/browserlayer.xml
37
38Add browser layer ...
39
40    >>> paster('addcontent browserlayer')
41    paster ...
42    Inserting ... into .../plone.example/plone/ploneexample/interfaces/__init__.py
43    ...
44    Copying ... to .../plone.example/plone/ploneexample/profiles/default/browserlayer.xml
45
46Now  IPlonePloneexample interface must be added to interfaces/__init__.py module
47
48     >>> cat('interfaces/__init__.py')
49     # -*- extra stuff goes here -*-
50     ...
51     class IPlonePloneexample(Interface):
52     ...
53
54And browserlayer.xml step must present in default generic setup profile:
55
56    >>> cat('profiles', 'default', 'browserlayer.xml')
57    <?xml version="1.0"?>
58    <layers>
59       <layer name="plone.ploneexample"
60         interface="plone.ploneexample.interfaces.IPlonePloneexample"/>
61    </layers>
62    <BLANKLINE>
63
Note: See TracBrowser for help on using the repository browser.