Changeset 2573 in products
- Timestamp:
- Jun 24, 2010 12:56:28 PM (14 years ago)
- Location:
- quintagroup.themetemplate/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.themetemplate/trunk/docs/HISTORY.txt
r2571 r2573 73 73 74 74 75 Version 0.7 76 ----------- 75 0.7 (unreleased) 76 ---------------- 77 77 78 78 * Add uninstall profile to fix skins tool after theme is uninstalled … … 80 80 81 81 82 Version 0.1 83 ----------- 82 0.1 (unreleased) 83 ---------------- 84 84 85 85 * Initial import Theme template with nested namespace. -
quintagroup.themetemplate/trunk/quintagroup/themetemplate/README.txt
r2571 r2573 9 9 10 10 quintagroup.themetemplate package is used for development of all Quintagroup themes 11 for Plone 3 (http://skins.quintagroup.com).11 for Plone 3 at http://skins.quintagroup.com. 12 12 13 13 Contents … … 27 27 After that you can extend theme package by the following elements: 28 28 29 30 31 32 33 29 - skin-layer(s) 30 - portlet(s) 31 - viewlet(s) 32 - css, js resource(s) 33 - objects in zexp files 34 34 35 35 Creation of a package is performed with *paster create* PasteScript command. … … 47 47 ... 48 48 49 You got standard python package content with 50 - *quintagroup* upper level namespace. 51 - *quintagroup.theme.example-configure.zcml* - zcml file 52 49 You 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 53 53 54 54 Check that:: … … 63 63 *qplone3_theme* template - creates theme with nested namespace. 64 64 65 By default - theme is placed in 66 67 quintagroup.theme.<3rd part of dotted package name> namespace 65 By default - theme is placed in *quintagroup.theme.<3rd part of dotted package name> namespace* 68 66 69 67 in our case - quintagroup.theme.example … … 93 91 94 92 Browser 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:: 98 97 99 98 >>> ls('browser') … … 122 121 creation you can point out your own name. Check this ... 123 122 124 First create configuration file with different skin name 123 First create configuration file with different skin name:: 124 125 125 >>> conf_data = """ 126 126 ... [pastescript] … … 129 129 >>> file('theme_config.conf','w').write(conf_data) 130 130 131 Create the same theme with your own skin name and check this 131 Create the same theme with your own skin name and check this:: 132 132 133 >>> paster('create -t qplone3_theme quintagroup.theme.example --no-interactive --overwrite --config=theme_config.conf') 133 134 paster create ... … … 145 146 146 147 *skins* directory 147 ----------------- -------148 ----------------- 148 149 149 150 It contains only README.txt file and NO SKIN LAYERS YET. 150 151 This is a job for localcommand ;) 151 152 152 But check whether I am right ... 153 But check whether I am right ...:: 154 153 155 >>> cd('quintagroup/theme/example') 154 156 >>> ls('skins') … … 156 158 157 159 158 *profiles* directory. 159 -------------------------------- 160 There is 'default' and uninstall profiles inside 160 *profiles* directory 161 -------------------- 162 163 There is 'default' and uninstall profiles inside:: 164 161 165 >>> 'default' in os.listdir('profiles') 162 166 True … … 165 169 166 170 There 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:: 169 174 170 175 >>> cd('profiles/default') … … 176 181 *skins.xml* profile makes your theme default on installation 177 182 and uses layers list from 'Plone Default' for our theme, 178 without any new layers (yet) .183 without any new layers (yet):: 179 184 180 185 >>> cat('skins.xml') … … 191 196 192 197 *import_steps.xml* - call _setupVarious_ function from 193 _setuphandlers.py_ module for additional installation steps .198 _setuphandlers.py_ module for additional installation steps:: 194 199 195 200 >>> cat('import_steps.xml') … … 203 208 ... 204 209 205 Look at setuphandlers.py module 210 Look at setuphandlers.py module:: 211 206 212 >>> cd('../..') 207 213 >>> cat('setuphandlers.py') … … 218 224 ZopeSkel template) with additional useful stuff: 219 225 220 221 222 223 224 225 226 226 - skin layers 227 - views 228 - viewlets 229 - portlets 230 - css 231 - javascripts 232 - objects in zexp files 227 233 228 234 So, in qplone3_theme generated package you can use *addcontent* ZopeSkel … … 231 237 IMPORTANT TO NOTE: localcommand (addcontent in our case) should be 232 238 called in any subdirectory of the generated theme package. And it won't 233 work outside this package ..239 work outside this package:: 234 240 235 241 >>> paster('addcontent -a') … … 259 265 ================= 260 266 261 For that case use *skin_layer* subtemplate with *addcontent* local command 267 For that case use *skin_layer* subtemplate with *addcontent* local command:: 262 268 263 269 >>> paster('addcontent --no-interactive skin_layer') … … 267 273 268 274 This command adds NEW 'skin_layer' (default name) directory to _skins_ directory, 269 with only CONTENT.txt file inside .275 with only CONTENT.txt file inside:: 270 276 271 277 >>> 'skin_layer' in os.listdir('skins') … … 274 280 CONTENT.txt 275 281 276 *skins.xml* profile is also updated: 282 *skins.xml* profile is also updated:: 277 283 278 284 >>> cat('profiles/default/skins.xml') … … 295 301 296 302 We 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 299 306 300 307 301 308 Adding PORTLET 302 ============== ============303 304 Only initialization files are available in portlets directory before adding new portlet .309 ============== 310 311 Only initialization files are available in portlets directory before adding new portlet:: 305 312 306 313 >>> ls('portlets') … … 308 315 configure.zcml 309 316 310 Add portlet with *portlet* subtemplate .317 Add portlet with *portlet* subtemplate:: 311 318 312 319 >>> paster('addcontent --no-interactive portlet') … … 318 325 After executing this local command ... 319 326 320 configure.zcml file in the theme root directory - includes portlets registry: 327 configure.zcml file in the theme root directory - includes portlets registry:: 321 328 322 329 >>> cat('configure.zcml') … … 326 333 ... 327 334 328 exampleportlet.pt template and exampleportlet.py script added to portlets directory. 329 >>> files = ('exampleportlet.pt', 'exampleportlet.py') 335 exampleportlet.pt template and exampleportlet.py script added to portlets directory:: 336 337 >>> files = ('exampleportlet.pt', 'exampleportlet.py') 330 338 >>> [True for d in files if d in os.listdir('portlets')] 331 339 [True, True] 332 340 333 And portlets/configure.zcml - register new portlet 341 And portlets/configure.zcml - register new portlet:: 342 334 343 >>> cat('portlets/configure.zcml') 335 344 <configure … … 347 356 ... 348 357 349 Finally, new portlet type is registered in portlets.xml profile 358 Finally, new portlet type is registered in portlets.xml profile:: 350 359 351 360 >>> cat('profiles/default/portlets.xml') … … 363 372 364 373 365 366 374 Adding CSS resource 367 375 =================== 368 376 369 Use *css_resource* subtemplate .377 Use *css_resource* subtemplate:: 370 378 371 379 >>> paster("addcontent --no-interactive css_resource") … … 377 385 378 386 This template adds (if does not exist yet) _stylesheets_ directory in _browser_ 379 directory 387 directory:: 380 388 381 389 >>> 'stylesheets' in os.listdir('browser') … … 383 391 384 392 In _stylesheets_ resource directory empty main.css stylesheet 385 resource added 393 resource added:: 386 394 387 395 >>> 'main.css' in os.listdir('browser/stylesheets') … … 391 399 392 400 393 New resource directory was registered in configure.zcml 401 New resource directory was registered in configure.zcml:: 394 402 395 403 >>> cat('browser/configure.zcml') … … 405 413 406 414 And cssregistry.xml profile was added into profiles/default directory with 407 registered main.css stylesheet 415 registered main.css stylesheet:: 408 416 409 417 >>> 'cssregistry.xml' in os.listdir('profiles/default') … … 430 438 431 439 This 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 434 443 435 444 IMPORTANT: … … 438 447 439 448 440 Use *css_dtml_skin* subtemplate .449 Use *css_dtml_skin* subtemplate:: 441 450 442 451 >>> paster("addcontent --no-interactive css_dtml_skin") … … 447 456 ... 448 457 449 This template adds main.css.dtml file into skins/skin_layer folder 458 This template adds main.css.dtml file into skins/skin_layer folder:: 450 459 451 460 >>> 'main.css.dtml' in os.listdir('skins/skin_layer') 452 461 True 453 462 454 The main.css.dtml file already prepared to use as dtml-document 463 The main.css.dtml file already prepared to use as dtml-document:: 464 455 465 >>> cat('skins/skin_layer/main.css.dtml') 456 466 /* … … 463 473 464 474 And cssregistry.xml profile was added into profiles/default directory with 465 registered main.css stylesheet 475 registered main.css stylesheet:: 466 476 467 477 >>> 'cssregistry.xml' in os.listdir('profiles/default') … … 482 492 -------------------------- 483 493 484 Use *js_resource* subtemplate .494 Use *js_resource* subtemplate:: 485 495 486 496 >>> paster('addcontent --no-interactive js_resource') … … 492 502 493 503 This template adds (if does not exist yet) _scripts_ directory in _browser_ 494 directory 504 directory:: 495 505 496 506 >>> 'scripts' in os.listdir('browser') … … 498 508 499 509 500 Empty foo.js javascript file was added to _scripts_ directory 510 Empty foo.js javascript file was added to _scripts_ directory:: 501 511 502 512 >>> 'foo.js' in os.listdir('browser/scripts') … … 506 516 507 517 508 New resource directory was registered in configure.zcml, if has not been registered yet .518 New resource directory was registered in configure.zcml, if has not been registered yet:: 509 519 510 520 >>> cat('browser/configure.zcml') … … 520 530 521 531 cssregistry.xml profile was added into profiles/default directory (if does not exist yet), 522 and register new foo.js javascript resource .532 and register new foo.js javascript resource:: 523 533 524 534 >>> 'jsregistry.xml' in os.listdir('profiles/default') … … 542 552 543 553 There are 2 types of viewlet subtemplates: 544 - viewlet_order 545 - viewlet_hidden 554 555 - viewlet_order 556 - viewlet_hidden 546 557 547 558 The first one is used for adding new viewlets and setting … … 552 563 ------------------- 553 564 554 Use *viewlet_order* subtemplate 565 Use *viewlet_order* subtemplate:: 555 566 556 567 >>> paster('addcontent --no-interactive viewlet_order') … … 565 576 This template adds (if not exist ;)) _viewlets.py_ module in browser directory. 566 577 With added Example ViewletBase class, which is bound to templates/example_viewlet.pt 567 template 578 template:: 568 579 569 580 >>> 'viewlets.py' in os.listdir('browser') … … 579 590 <BLANKLINE> 580 591 581 Check template file in templates directory .592 Check template file in templates directory:: 582 593 583 594 >>> 'example_viewlet.pt' in os.listdir('browser/templates') … … 586 597 <BLANKLINE> 587 598 588 New viewlet is registered in configure.zcml 599 New viewlet is registered in configure.zcml:: 589 600 590 601 >>> cat('browser/configure.zcml') … … 602 613 603 614 viewlets.xml profile is added to profiles/default directory with new viewlet 604 registration, ordered for specified viewlet manager .615 registration, ordered for specified viewlet manager:: 605 616 606 617 >>> 'viewlets.xml' in os.listdir('profiles/default') … … 625 636 --------------------- 626 637 627 For that case you can use *viewlet_hidden* subtemplate 638 For that case you can use *viewlet_hidden* subtemplate:: 628 639 629 640 >>> paster('addcontent --no-interactive viewlet_hidden') … … 636 647 637 648 There is viewlet.xml profile in profiles/default directory 638 which hides viewlet for specified viewlet manager 649 which hides viewlet for specified viewlet manager:: 639 650 640 651 >>> 'viewlets.xml' in os.listdir('profiles/default') … … 665 676 *import_zexps* subtemplate extends your theme with 666 677 mechanism for importing list of zexp formated files 667 into portal root on theme instllation .678 into portal root on theme instllation:: 668 679 669 680 >>> paster('addcontent --no-interactive import_zexps') … … 679 690 ... 680 691 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 692 As 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 686 698 687 699 1. 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.:: 689 701 690 702 >>> ls('import') … … 693 705 694 706 2. 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:: 696 708 697 709 >>> 'import_zexps' in os.listdir('profiles') … … 713 725 714 726 3. profiles.zcml configuration updated with new genericsetup profile for zexps 715 importing .727 importing:: 716 728 717 729 >>> cat('profiles.zcml') … … 728 740 ... 729 741 730 4. Check setuphandlers.py module - there must be importZEXPs function defined 742 4. Check setuphandlers.py module - there must be importZEXPs function defined:: 731 743 732 744 >>> cat('setuphandlers.py') … … 744 756 Before releasing theme - I suggest to clean up setup.py script: 745 757 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) 754 763 755 764 Steps mentioned above prevent possible problems with … … 759 768 ------ 760 769 761 762 770 * quintagroup.themetemplate v0.25 compatible with ZopeSkel >= 2.15 771
Note: See TracChangeset
for help on using the changeset viewer.