Changeset 2573 in products


Ignore:
Timestamp:
Jun 24, 2010 12:56:28 PM (14 years ago)
Author:
olha
Message:

README file formatting corrected

Location:
quintagroup.themetemplate/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.themetemplate/trunk/docs/HISTORY.txt

    r2571 r2573  
    7373 
    7474 
    75 Version 0.7 
    76 ----------- 
     750.7 (unreleased) 
     76---------------- 
    7777 
    7878* Add uninstall profile to fix skins tool after theme is uninstalled 
     
    8080 
    8181 
    82 Version 0.1 
    83 ----------- 
     820.1 (unreleased) 
     83---------------- 
    8484 
    8585* Initial import Theme template with nested namespace. 
  • quintagroup.themetemplate/trunk/quintagroup/themetemplate/README.txt

    r2571 r2573  
    99 
    1010quintagroup.themetemplate package is used for development of all Quintagroup themes  
    11 for Plone 3 (http://skins.quintagroup.com). 
     11for Plone 3 at http://skins.quintagroup.com. 
    1212 
    1313Contents 
     
    2727After that you can extend theme package by the following elements: 
    2828 
    29   - skin-layer(s) 
    30   - portlet(s) 
    31   - viewlet(s) 
    32   - css, js resource(s) 
    33   - objects in zexp files 
     29- skin-layer(s) 
     30- portlet(s) 
     31- viewlet(s) 
     32- css, js resource(s) 
     33- objects in zexp files 
    3434 
    3535Creation of a package is performed with *paster create* PasteScript command. 
     
    4747    ... 
    4848 
    49 You got standard python package content with  
    50   - *quintagroup* upper level namespace. 
    51   - *quintagroup.theme.example-configure.zcml* - zcml file  
    52     for adding into package-includes directory 
     49You got standard python package content with 
     50 
     51- *quintagroup* upper level namespace. 
     52- *quintagroup.theme.example-configure.zcml* - zcml file for adding into package-includes directory 
    5353 
    5454Check that:: 
     
    6363*qplone3_theme* template - creates theme with nested namespace. 
    6464 
    65 By default - theme is placed in 
    66  
    67     quintagroup.theme.<3rd part of dotted package name> namespace 
     65By default - theme is placed in *quintagroup.theme.<3rd part of dotted package name> namespace* 
    6866 
    6967in our case - quintagroup.theme.example 
     
    9391 
    9492Browser directory contains: 
    95   - 'templates' resource directory 
    96   - interfaces.py module with IThemeSpecific marker interface 
    97   - configure.zcml, with registered theme marker interface 
     93 
     94- 'templates' resource directory 
     95- interfaces.py module with IThemeSpecific marker interface 
     96- configure.zcml, with registered theme marker interface:: 
    9897 
    9998    >>> ls('browser') 
     
    122121creation you can point out your own name. Check this ... 
    123122 
    124 First create configuration file with different skin name 
     123First create configuration file with different skin name:: 
     124 
    125125    >>> conf_data = """ 
    126126    ... [pastescript] 
     
    129129    >>> file('theme_config.conf','w').write(conf_data) 
    130130 
    131 Create the same theme with your own skin name and check this 
     131Create the same theme with your own skin name and check this:: 
     132 
    132133    >>> paster('create -t qplone3_theme quintagroup.theme.example --no-interactive --overwrite --config=theme_config.conf') 
    133134    paster create ... 
     
    145146 
    146147*skins* directory 
    147 ------------------------ 
     148----------------- 
    148149 
    149150It contains only README.txt file and NO SKIN LAYERS YET. 
    150151This is a job for localcommand ;) 
    151152 
    152 But check whether I am right ... 
     153But check whether I am right ...:: 
     154 
    153155    >>> cd('quintagroup/theme/example') 
    154156    >>> ls('skins') 
     
    156158 
    157159 
    158 *profiles* directory. 
    159 -------------------------------- 
    160 There is 'default' and uninstall profiles inside 
     160*profiles* directory 
     161-------------------- 
     162 
     163There is 'default' and uninstall profiles inside:: 
     164 
    161165    >>> 'default' in os.listdir('profiles') 
    162166    True 
     
    165169 
    166170There are the following items in default profile: 
    167  - import_steps.xml - for any reason. 
    168  - skins.xml - for registering skins directory 
     171 
     172- import_steps.xml - for any reason. 
     173- skins.xml - for registering skins directory:: 
    169174 
    170175    >>> cd('profiles/default') 
     
    176181*skins.xml* profile makes your theme default on installation 
    177182and uses layers list from 'Plone Default' for our theme, 
    178 without any new layers (yet). 
     183without any new layers (yet):: 
    179184 
    180185    >>> cat('skins.xml') 
     
    191196 
    192197*import_steps.xml* - call _setupVarious_ function from 
    193 _setuphandlers.py_ module for additional installation steps. 
     198_setuphandlers.py_ module for additional installation steps:: 
    194199 
    195200    >>> cat('import_steps.xml') 
     
    203208    ... 
    204209 
    205 Look at setuphandlers.py module 
     210Look at setuphandlers.py module:: 
     211 
    206212    >>> cd('../..') 
    207213    >>> cat('setuphandlers.py') 
     
    218224ZopeSkel template) with additional useful stuff: 
    219225 
    220   - skin layers 
    221   - views 
    222   - viewlets 
    223   - portlets 
    224   - css 
    225   - javascripts 
    226   - objects in zexp files 
     226- skin layers 
     227- views 
     228- viewlets 
     229- portlets 
     230- css 
     231- javascripts 
     232- objects in zexp files 
    227233 
    228234So, in qplone3_theme generated package you can use *addcontent* ZopeSkel 
     
    231237IMPORTANT TO NOTE: localcommand (addcontent in our case) should be 
    232238called in any subdirectory of the generated theme package. And it won't 
    233 work outside this package.. 
     239work outside this package:: 
    234240 
    235241    >>> paster('addcontent -a') 
     
    259265================= 
    260266 
    261 For that case use *skin_layer* subtemplate with *addcontent* local command 
     267For that case use *skin_layer* subtemplate with *addcontent* local command:: 
    262268 
    263269    >>> paster('addcontent --no-interactive skin_layer') 
     
    267273 
    268274This command adds NEW 'skin_layer' (default name) directory to _skins_ directory, 
    269 with only CONTENT.txt file inside. 
     275with only CONTENT.txt file inside:: 
    270276 
    271277    >>> 'skin_layer' in os.listdir('skins') 
     
    274280    CONTENT.txt 
    275281 
    276 *skins.xml* profile is also updated: 
     282*skins.xml* profile is also updated:: 
    277283 
    278284    >>> cat('profiles/default/skins.xml') 
     
    295301 
    296302We can see, that:  
    297   - skin_layer directory was registered as Filesystem Directory View 
    298   - skin_layer Filesystem Directory View was added to our theme layers list 
     303 
     304- skin_layer directory was registered as Filesystem Directory View 
     305- skin_layer Filesystem Directory View was added to our theme layers list 
    299306 
    300307 
    301308Adding PORTLET 
    302 ========================== 
    303  
    304 Only initialization files are available in portlets directory before adding new portlet. 
     309============== 
     310 
     311Only initialization files are available in portlets directory before adding new portlet:: 
    305312 
    306313    >>> ls('portlets') 
     
    308315    configure.zcml 
    309316 
    310 Add portlet with *portlet* subtemplate. 
     317Add portlet with *portlet* subtemplate:: 
    311318 
    312319    >>> paster('addcontent --no-interactive portlet') 
     
    318325After executing this local command ... 
    319326 
    320 configure.zcml file in the theme root directory - includes portlets registry: 
     327configure.zcml file in the theme root directory - includes portlets registry:: 
    321328 
    322329    >>> cat('configure.zcml') 
     
    326333    ... 
    327334 
    328 exampleportlet.pt template and exampleportlet.py script added to portlets directory. 
    329     >>> files = ('exampleportlet.pt', 'exampleportlet.py') 
     335exampleportlet.pt template and exampleportlet.py script added to portlets directory:: 
     336   
     337  >>> files = ('exampleportlet.pt', 'exampleportlet.py') 
    330338    >>> [True for d in files if d in os.listdir('portlets')] 
    331339    [True, True] 
    332340 
    333 And portlets/configure.zcml - register new portlet 
     341And portlets/configure.zcml - register new portlet:: 
     342 
    334343    >>> cat('portlets/configure.zcml') 
    335344    <configure 
     
    347356    ... 
    348357 
    349 Finally, new portlet type is registered in portlets.xml profile 
     358Finally, new portlet type is registered in portlets.xml profile:: 
    350359 
    351360    >>> cat('profiles/default/portlets.xml') 
     
    363372 
    364373 
    365  
    366374Adding CSS resource 
    367375=================== 
    368376 
    369 Use *css_resource* subtemplate. 
     377Use *css_resource* subtemplate:: 
    370378 
    371379    >>> paster("addcontent --no-interactive css_resource") 
     
    377385 
    378386This template adds (if does not exist yet) _stylesheets_ directory in _browser_ 
    379 directory 
     387directory:: 
    380388 
    381389    >>> 'stylesheets' in os.listdir('browser') 
     
    383391 
    384392In _stylesheets_ resource directory empty main.css stylesheet 
    385 resource added 
     393resource added:: 
    386394 
    387395    >>> 'main.css' in os.listdir('browser/stylesheets') 
     
    391399 
    392400 
    393 New resource directory was registered in configure.zcml 
     401New resource directory was registered in configure.zcml:: 
    394402 
    395403    >>> cat('browser/configure.zcml') 
     
    405413 
    406414And cssregistry.xml profile was added into profiles/default directory with 
    407 registered main.css stylesheet 
     415registered main.css stylesheet:: 
    408416 
    409417    >>> 'cssregistry.xml' in os.listdir('profiles/default') 
     
    430438 
    431439This subtemplate has several benefits before registering css as resource layer: 
    432   - in dtml file you can use power of dtml language 
    433   - this resource can be overriden by customer if he needs that 
     440 
     441- in dtml file you can use power of dtml language 
     442- this resource can be overriden by customer if he needs that 
    434443 
    435444IMPORTANT: 
     
    438447 
    439448 
    440 Use *css_dtml_skin* subtemplate. 
     449Use *css_dtml_skin* subtemplate:: 
    441450 
    442451    >>> paster("addcontent --no-interactive css_dtml_skin") 
     
    447456    ... 
    448457 
    449 This template adds main.css.dtml file into skins/skin_layer folder 
     458This template adds main.css.dtml file into skins/skin_layer folder:: 
    450459 
    451460    >>> 'main.css.dtml' in os.listdir('skins/skin_layer') 
    452461    True 
    453462 
    454 The main.css.dtml file already prepared to use as dtml-document 
     463The main.css.dtml file already prepared to use as dtml-document:: 
     464 
    455465    >>> cat('skins/skin_layer/main.css.dtml') 
    456466    /* 
     
    463473 
    464474And cssregistry.xml profile was added into profiles/default directory with 
    465 registered main.css stylesheet 
     475registered main.css stylesheet:: 
    466476 
    467477    >>> 'cssregistry.xml' in os.listdir('profiles/default') 
     
    482492-------------------------- 
    483493 
    484 Use *js_resource* subtemplate. 
     494Use *js_resource* subtemplate:: 
    485495 
    486496    >>> paster('addcontent --no-interactive js_resource') 
     
    492502 
    493503This template adds (if does not exist yet) _scripts_ directory in _browser_ 
    494 directory 
     504directory:: 
    495505 
    496506    >>> 'scripts' in os.listdir('browser') 
     
    498508 
    499509 
    500 Empty foo.js javascript file was added to _scripts_ directory 
     510Empty foo.js javascript file was added to _scripts_ directory:: 
    501511 
    502512    >>> 'foo.js' in os.listdir('browser/scripts') 
     
    506516 
    507517 
    508 New resource directory was registered in configure.zcml, if has not been registered yet. 
     518New resource directory was registered in configure.zcml, if has not been registered yet:: 
    509519 
    510520    >>> cat('browser/configure.zcml') 
     
    520530 
    521531cssregistry.xml profile was added into profiles/default directory (if does not exist yet), 
    522 and register new foo.js javascript resource. 
     532and register new foo.js javascript resource:: 
    523533 
    524534    >>> 'jsregistry.xml' in os.listdir('profiles/default') 
     
    542552 
    543553There are 2 types of viewlet subtemplates: 
    544  - viewlet_order 
    545  - viewlet_hidden 
     554 
     555- viewlet_order 
     556- viewlet_hidden 
    546557 
    547558The first one is used for adding new viewlets and setting  
     
    552563------------------- 
    553564 
    554 Use *viewlet_order* subtemplate 
     565Use *viewlet_order* subtemplate:: 
    555566 
    556567    >>> paster('addcontent --no-interactive viewlet_order') 
     
    565576This template adds (if not exist ;)) _viewlets.py_ module in browser directory. 
    566577With added Example ViewletBase class, which is bound to templates/example_viewlet.pt 
    567 template 
     578template:: 
    568579 
    569580    >>> 'viewlets.py' in os.listdir('browser') 
     
    579590    <BLANKLINE> 
    580591 
    581 Check template file in templates directory. 
     592Check template file in templates directory:: 
    582593 
    583594    >>> 'example_viewlet.pt' in os.listdir('browser/templates') 
     
    586597    <BLANKLINE> 
    587598 
    588 New viewlet is registered in configure.zcml 
     599New viewlet is registered in configure.zcml:: 
    589600 
    590601    >>> cat('browser/configure.zcml') 
     
    602613 
    603614viewlets.xml profile is added to profiles/default directory with new viewlet  
    604 registration, ordered for specified viewlet manager. 
     615registration, ordered for specified viewlet manager:: 
    605616 
    606617    >>> 'viewlets.xml' in os.listdir('profiles/default') 
     
    625636--------------------- 
    626637 
    627 For that case you can use *viewlet_hidden* subtemplate 
     638For that case you can use *viewlet_hidden* subtemplate:: 
    628639 
    629640    >>> paster('addcontent --no-interactive viewlet_hidden') 
     
    636647 
    637648There is viewlet.xml profile in profiles/default directory 
    638 which hides viewlet for specified viewlet manager 
     649which hides viewlet for specified viewlet manager:: 
    639650 
    640651    >>> 'viewlets.xml' in os.listdir('profiles/default') 
     
    665676*import_zexps* subtemplate extends your theme with 
    666677mechanism for importing list of zexp formated files 
    667 into portal root on theme instllation. 
     678into portal root on theme instllation:: 
    668679 
    669680    >>> paster('addcontent --no-interactive import_zexps') 
     
    679690    ... 
    680691 
    681 As we see from the upper log: 
    682    - 'import' directory was added into root of the theme 
    683    - profiles stuff was updated 
    684    - profiles.zcml file is updated 
    685    - some stuff into setuphandlers.py module was inserted 
     692As we see from the upper log 
     693 
     694- 'import' directory was added into root of the theme 
     695- profiles stuff was updated 
     696- profiles.zcml file is updated 
     697- some stuff into setuphandlers.py module was inserted 
    686698     
    6876991. There was empty 'import' directory added, where you 
    688    will put zexp objects for install into portal root. 
     700   will put zexp objects for install into portal root.:: 
    689701 
    690702    >>> ls('import') 
     
    693705 
    6947062. import_steps.xml was added in profiles/import_zexps directory, 
    695    which contains additional *quintagroup.theme.example.import_zexps* step. 
     707   which contains additional *quintagroup.theme.example.import_zexps* step:: 
    696708 
    697709    >>> 'import_zexps' in os.listdir('profiles') 
     
    713725 
    7147263. profiles.zcml configuration updated with new genericsetup profile for zexps 
    715    importing. 
     727   importing:: 
    716728 
    717729    >>> cat('profiles.zcml') 
     
    728740    ... 
    729741     
    730 4. Check setuphandlers.py module - there must be importZEXPs function defined 
     7424. Check setuphandlers.py module - there must be importZEXPs function defined:: 
    731743 
    732744    >>> cat('setuphandlers.py') 
     
    744756Before releasing theme - I suggest to clean up setup.py script: 
    745757 
    746  - remove *theme_vars* argument (its value is useful only for 
    747    theme development) 
    748  
    749  - remove *entry_points* argument (same reason). 
    750    It's useless in plone for now. 
    751  
    752  - And remove *paster_plugins* argument too (it has sence 
    753    in conjunction with entry_points during theme developing) 
     758- remove *theme_vars* argument (its value is useful only for theme development) 
     759 
     760- remove *entry_points* argument (same reason). It's useless in plone for now. 
     761 
     762- And remove *paster_plugins* argument too (it has sence in conjunction with entry_points during theme developing) 
    754763 
    755764Steps mentioned above prevent possible problems with 
     
    759768------ 
    760769 
    761  * quintagroup.themetemplate v0.25 compatible with ZopeSkel >= 2.15 
    762  
     770* quintagroup.themetemplate v0.25 compatible with ZopeSkel >= 2.15 
     771 
Note: See TracChangeset for help on using the changeset viewer.