src/source/howto-skin.rst
branchdoc-dc
changeset 83 ee94d17857a4
parent 81 40923f406943
child 85 82165875e66b
equal deleted inserted replaced
82:887dbb9f54d7 83:ee94d17857a4
     1 .. _skinhowto:
     1 .. _skinhowto:
     2 
     2 
     3 
     3 
     4 How to create a new skin?
     4 How to create Skin?
     5 =========================
     5 ===================
     6 
     6 
     7 A Skin is a tagging interface for associating media, javascript and CSS resources to a **renderer**
     7 A Skin is a tagging interface for associating media, javascript and CSS resources to a **renderer**
     8 
     8 
     9 1) Configuring resource library
     9 1) Configuring resource library
    10 -------------------------------
    10 -------------------------------
    60 
    60 
    61     @adapter_config(context=(Interface, ICustomLayer, Interface), provides=IResources)
    61     @adapter_config(context=(Interface, ICustomLayer, Interface), provides=IResources)
    62     class CustomSkinResourcesAdapter(ContextRequestViewAdapter):
    62     class CustomSkinResourcesAdapter(ContextRequestViewAdapter):
    63     """Custom skin resources adapter"""
    63     """Custom skin resources adapter"""
    64 
    64 
    65     def get_resources(self):
    65         def get_resources(self):
    66         mycms.need()
    66             mycms.need()
       
    67 
       
    68 
       
    69 We have defined a Multiadapter with context=(context, request, view).
    67 
    70 
    68 .. note::
    71 .. note::
    69 
    72 
    70     In the ZMI website you can now change the default graphical theme by you custom skin
    73     In the ZMI website you can now change the default graphical theme by you custom skin
    71 
    74