Changeset 3049 in products
- Timestamp:
- Nov 22, 2010 6:22:32 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.themetemplate/trunk/quintagroup.themetemplate.egg-info/PKG-INFO
r2569 r3049 1 1 Metadata-Version: 1.0 2 2 Name: quintagroup.themetemplate 3 Version: 0.2 33 Version: 0.26 4 4 Summary: Quintagroup theme template for Plone 3 with nested namespace 5 5 Home-page: http://svn.quintagroup.com/products/quintagroup.themetemplate … … 17 17 18 18 quintagroup.themetemplate package is used for development of all Quintagroup themes 19 for Plone 3 (http://skins.quintagroup.com).19 for Plone 3 at http://skins.quintagroup.com. 20 20 21 21 Contents … … 51 51 Use `paster create` command for that:: 52 52 53 >>> paster('create -t qplone3_theme quintagroup.theme.example -- no-interactive --overwrite')54 paster create -t qplone3_theme quintagroup.theme.example --no-interactive53 >>> paster('create -t qplone3_theme quintagroup.theme.example --overwrite') 54 paster create -t qplone3_theme quintagroup.theme.example ... 55 55 ... 56 56 57 57 You got standard python package content with 58 58 59 - *quintagroup* upper level namespace. 59 - *quintagroup.theme.example-configure.zcml* - zcml file 60 for adding into package-includes directory 60 - *quintagroup.theme.example-configure.zcml* - zcml file for adding into package-includes directory 61 61 62 62 Check that:: … … 71 71 *qplone3_theme* template - creates theme with nested namespace. 72 72 73 By default - theme is placed in 74 75 quintagroup.theme.<3rd part of dotted package name> namespace 73 By default - theme is placed in *quintagroup.theme.<3rd part of dotted package name> namespace* 76 74 77 75 in our case - quintagroup.theme.example … … 101 99 102 100 Browser directory contains: 101 103 102 - 'templates' resource directory 104 103 - interfaces.py module with IThemeSpecific marker interface 105 - configure.zcml, with registered theme marker interface 104 - configure.zcml, with registered theme marker interface:: 106 105 107 106 >>> ls('browser') … … 130 129 creation you can point out your own name. Check this ... 131 130 132 First create configuration file with different skin name 131 First create configuration file with different skin name:: 132 133 133 >>> conf_data = """ 134 134 ... [pastescript] … … 137 137 >>> file('theme_config.conf','w').write(conf_data) 138 138 139 Create the same theme with your own skin name and check this 140 >>> paster('create -t qplone3_theme quintagroup.theme.example --no-interactive --overwrite --config=theme_config.conf') 139 Create the same theme with your own skin name and check this:: 140 141 >>> paster('create -t qplone3_theme quintagroup.theme.example --overwrite --config=theme_config.conf') 141 142 paster create ... 142 143 >>> cd(package_dir) … … 153 154 154 155 *skins* directory 155 ----------------- -------156 ----------------- 156 157 157 158 It contains only README.txt file and NO SKIN LAYERS YET. 158 159 This is a job for localcommand ;) 159 160 160 But check whether I am right ... 161 But check whether I am right ...:: 162 161 163 >>> cd('quintagroup/theme/example') 162 164 >>> ls('skins') … … 164 166 165 167 166 *profiles* directory. 167 -------------------------------- 168 There is 'default' and uninstall profiles inside 168 *profiles* directory 169 -------------------- 170 171 There is 'default' and uninstall profiles inside:: 172 169 173 >>> 'default' in os.listdir('profiles') 170 174 True … … 173 177 174 178 There are the following items in default profile: 179 175 180 - import_steps.xml - for any reason. 176 - skins.xml - for registering skins directory 181 - skins.xml - for registering skins directory:: 177 182 178 183 >>> cd('profiles/default') … … 184 189 *skins.xml* profile makes your theme default on installation 185 190 and uses layers list from 'Plone Default' for our theme, 186 without any new layers (yet) .191 without any new layers (yet):: 187 192 188 193 >>> cat('skins.xml') … … 190 195 ... 191 196 <object name="portal_skins" ... 192 default_skin="My Theme Name" >197 default_skin="My Theme Name" request_varname="plone_skin"> 193 198 ... 194 199 <skin-path name="My Theme Name" based-on="Plone Default"> … … 199 204 200 205 *import_steps.xml* - call _setupVarious_ function from 201 _setuphandlers.py_ module for additional installation steps .206 _setuphandlers.py_ module for additional installation steps:: 202 207 203 208 >>> cat('import_steps.xml') … … 211 216 ... 212 217 213 Look at setuphandlers.py module 218 Look at setuphandlers.py module:: 219 214 220 >>> cd('../..') 215 221 >>> cat('setuphandlers.py') … … 239 245 IMPORTANT TO NOTE: localcommand (addcontent in our case) should be 240 246 called in any subdirectory of the generated theme package. And it won't 241 work outside this package ..247 work outside this package:: 242 248 243 249 >>> paster('addcontent -a') … … 267 273 ================= 268 274 269 For that case use *skin_layer* subtemplate with *addcontent* local command 270 271 >>> paster('addcontent --no-interactiveskin_layer')272 paster addcontent --no-interactive skin_layer275 For that case use *skin_layer* subtemplate with *addcontent* local command:: 276 277 >>> paster('addcontent skin_layer') 278 paster addcontent skin_layer ... 273 279 Recursing into profiles 274 280 ... 275 281 276 282 This command adds NEW 'skin_layer' (default name) directory to _skins_ directory, 277 with only CONTENT.txt file inside .283 with only CONTENT.txt file inside:: 278 284 279 285 >>> 'skin_layer' in os.listdir('skins') … … 282 288 CONTENT.txt 283 289 284 *skins.xml* profile is also updated: 290 *skins.xml* profile is also updated:: 285 291 286 292 >>> cat('profiles/default/skins.xml') … … 288 294 ... 289 295 <object name="portal_skins" allow_any="False" cookie_persistence="False" 290 default_skin="My Theme Name" >296 default_skin="My Theme Name" request_varname="plone_skin"> 291 297 ... 292 298 <object name="skin_layer" … … 303 309 304 310 We can see, that: 311 305 312 - skin_layer directory was registered as Filesystem Directory View 306 313 - skin_layer Filesystem Directory View was added to our theme layers list … … 308 315 309 316 Adding PORTLET 310 ============== ============311 312 Only initialization files are available in portlets directory before adding new portlet .317 ============== 318 319 Only initialization files are available in portlets directory before adding new portlet:: 313 320 314 321 >>> ls('portlets') … … 316 323 configure.zcml 317 324 318 Add portlet with *portlet* subtemplate .319 320 >>> paster('addcontent --no-interactiveportlet')321 paster addcontent --no-interactive portlet325 Add portlet with *portlet* subtemplate:: 326 327 >>> paster('addcontent portlet') 328 paster addcontent portlet ... 322 329 ... 323 330 Recursing into portlets … … 326 333 After executing this local command ... 327 334 328 configure.zcml file in the theme root directory - includes portlets registry: 335 configure.zcml file in the theme root directory - includes portlets registry:: 329 336 330 337 >>> cat('configure.zcml') … … 334 341 ... 335 342 336 exampleportlet.pt template and exampleportlet.py script added to portlets directory. 343 exampleportlet.pt template and exampleportlet.py script added to portlets directory:: 344 337 345 >>> files = ('exampleportlet.pt', 'exampleportlet.py') 338 346 >>> [True for d in files if d in os.listdir('portlets')] 339 347 [True, True] 340 348 341 And portlets/configure.zcml - register new portlet 349 And portlets/configure.zcml - register new portlet:: 350 342 351 >>> cat('portlets/configure.zcml') 343 352 <configure … … 355 364 ... 356 365 357 Finally, new portlet type is registered in portlets.xml profile 366 Finally, new portlet type is registered in portlets.xml profile:: 358 367 359 368 >>> cat('profiles/default/portlets.xml') … … 371 380 372 381 373 374 382 Adding CSS resource 375 383 =================== 376 384 377 Use *css_resource* subtemplate .378 379 >>> paster("addcontent --no-interactivecss_resource")380 paster addcontent --no-interactive css_resource385 Use *css_resource* subtemplate:: 386 387 >>> paster("addcontent css_resource") 388 paster addcontent css_resource ... 381 389 Recursing into browser 382 390 ... … … 385 393 386 394 This template adds (if does not exist yet) _stylesheets_ directory in _browser_ 387 directory 395 directory:: 388 396 389 397 >>> 'stylesheets' in os.listdir('browser') … … 391 399 392 400 In _stylesheets_ resource directory empty main.css stylesheet 393 resource added 401 resource added:: 394 402 395 403 >>> 'main.css' in os.listdir('browser/stylesheets') … … 399 407 400 408 401 New resource directory was registered in configure.zcml 409 New resource directory was registered in configure.zcml:: 402 410 403 411 >>> cat('browser/configure.zcml') … … 413 421 414 422 And cssregistry.xml profile was added into profiles/default directory with 415 registered main.css stylesheet 423 registered main.css stylesheet:: 416 424 417 425 >>> 'cssregistry.xml' in os.listdir('profiles/default') … … 438 446 439 447 This subtemplate has several benefits before registering css as resource layer: 448 440 449 - in dtml file you can use power of dtml language 441 450 - this resource can be overriden by customer if he needs that … … 446 455 447 456 448 Use *css_dtml_skin* subtemplate .449 450 >>> paster("addcontent --no-interactivecss_dtml_skin")451 paster addcontent --no-interactive css_dtml_skin457 Use *css_dtml_skin* subtemplate:: 458 459 >>> paster("addcontent css_dtml_skin") 460 paster addcontent css_dtml_skin ... 452 461 Recursing into profiles 453 462 ... … … 455 464 ... 456 465 457 This template adds main.css.dtml file into skins/skin_layer folder 466 This template adds main.css.dtml file into skins/skin_layer folder:: 458 467 459 468 >>> 'main.css.dtml' in os.listdir('skins/skin_layer') 460 469 True 461 470 462 The main.css.dtml file already prepared to use as dtml-document 471 The main.css.dtml file already prepared to use as dtml-document:: 472 463 473 >>> cat('skins/skin_layer/main.css.dtml') 464 474 /* … … 471 481 472 482 And cssregistry.xml profile was added into profiles/default directory with 473 registered main.css stylesheet 483 registered main.css stylesheet:: 474 484 475 485 >>> 'cssregistry.xml' in os.listdir('profiles/default') … … 490 500 -------------------------- 491 501 492 Use *js_resource* subtemplate .493 494 >>> paster('addcontent --no-interactivejs_resource')495 paster addcontent --no-interactive js_resource502 Use *js_resource* subtemplate:: 503 504 >>> paster('addcontent js_resource') 505 paster addcontent js_resource ... 496 506 Recursing into browser 497 507 ... … … 500 510 501 511 This template adds (if does not exist yet) _scripts_ directory in _browser_ 502 directory 512 directory:: 503 513 504 514 >>> 'scripts' in os.listdir('browser') … … 506 516 507 517 508 Empty foo.js javascript file was added to _scripts_ directory 518 Empty foo.js javascript file was added to _scripts_ directory:: 509 519 510 520 >>> 'foo.js' in os.listdir('browser/scripts') … … 514 524 515 525 516 New resource directory was registered in configure.zcml, if has not been registered yet .526 New resource directory was registered in configure.zcml, if has not been registered yet:: 517 527 518 528 >>> cat('browser/configure.zcml') … … 528 538 529 539 cssregistry.xml profile was added into profiles/default directory (if does not exist yet), 530 and register new foo.js javascript resource .540 and register new foo.js javascript resource:: 531 541 532 542 >>> 'jsregistry.xml' in os.listdir('profiles/default') … … 550 560 551 561 There are 2 types of viewlet subtemplates: 562 552 563 - viewlet_order 553 564 - viewlet_hidden … … 560 571 ------------------- 561 572 562 Use *viewlet_order* subtemplate 563 564 >>> paster('addcontent --no-interactiveviewlet_order')565 paster addcontent --no-interactive viewlet_order573 Use *viewlet_order* subtemplate:: 574 575 >>> paster('addcontent viewlet_order') 576 paster addcontent viewlet_order ... 566 577 Recursing into browser 567 578 ... … … 573 584 This template adds (if not exist ;)) _viewlets.py_ module in browser directory. 574 585 With added Example ViewletBase class, which is bound to templates/example_viewlet.pt 575 template 586 template:: 576 587 577 588 >>> 'viewlets.py' in os.listdir('browser') … … 587 598 <BLANKLINE> 588 599 589 Check template file in templates directory .600 Check template file in templates directory:: 590 601 591 602 >>> 'example_viewlet.pt' in os.listdir('browser/templates') … … 594 605 <BLANKLINE> 595 606 596 New viewlet is registered in configure.zcml 607 New viewlet is registered in configure.zcml:: 597 608 598 609 >>> cat('browser/configure.zcml') … … 610 621 611 622 viewlets.xml profile is added to profiles/default directory with new viewlet 612 registration, ordered for specified viewlet manager .623 registration, ordered for specified viewlet manager:: 613 624 614 625 >>> 'viewlets.xml' in os.listdir('profiles/default') … … 633 644 --------------------- 634 645 635 For that case you can use *viewlet_hidden* subtemplate 636 637 >>> paster('addcontent --no-interactiveviewlet_hidden')638 paster addcontent --no-interactive viewlet_hidden646 For that case you can use *viewlet_hidden* subtemplate:: 647 648 >>> paster('addcontent viewlet_hidden') 649 paster addcontent viewlet_hidden ... 639 650 Recursing into profiles 640 651 ... … … 644 655 645 656 There is viewlet.xml profile in profiles/default directory 646 which hides viewlet for specified viewlet manager 657 which hides viewlet for specified viewlet manager:: 647 658 648 659 >>> 'viewlets.xml' in os.listdir('profiles/default') … … 673 684 *import_zexps* subtemplate extends your theme with 674 685 mechanism for importing list of zexp formated files 675 into portal root on theme instllation .676 677 >>> paster('addcontent --no-interactiveimport_zexps')678 paster addcontent --no-interactive import_zexps686 into portal root on theme instllation:: 687 688 >>> paster('addcontent import_zexps') 689 paster addcontent import_zexps ... 679 690 ... 680 691 Recursing into import … … 687 698 ... 688 699 689 As we see from the upper log: 700 As we see from the upper log 701 690 702 - 'import' directory was added into root of the theme 691 703 - profiles stuff was updated … … 694 706 695 707 1. There was empty 'import' directory added, where you 696 will put zexp objects for install into portal root. 708 will put zexp objects for install into portal root.:: 697 709 698 710 >>> ls('import') … … 701 713 702 714 2. import_steps.xml was added in profiles/import_zexps directory, 703 which contains additional *quintagroup.theme.example.import_zexps* step .715 which contains additional *quintagroup.theme.example.import_zexps* step:: 704 716 705 717 >>> 'import_zexps' in os.listdir('profiles') … … 721 733 722 734 3. profiles.zcml configuration updated with new genericsetup profile for zexps 723 importing .735 importing:: 724 736 725 737 >>> cat('profiles.zcml') … … 736 748 ... 737 749 738 4. Check setuphandlers.py module - there must be importZEXPs function defined 750 4. Check setuphandlers.py module - there must be importZEXPs function defined:: 739 751 740 752 >>> cat('setuphandlers.py') … … 752 764 Before releasing theme - I suggest to clean up setup.py script: 753 765 754 - remove *theme_vars* argument (its value is useful only for 755 theme development) 756 757 - remove *entry_points* argument (same reason). 758 It's useless in plone for now. 759 760 - And remove *paster_plugins* argument too (it has sence 761 in conjunction with entry_points during theme developing) 766 - remove *theme_vars* argument (its value is useful only for theme development) 767 768 - remove *entry_points* argument (same reason). It's useless in plone for now. 769 770 - And remove *paster_plugins* argument too (it has sence in conjunction with entry_points during theme developing) 762 771 763 772 Steps mentioned above prevent possible problems with 764 773 theme distribution/deployment. 765 774 775 Notes: 776 ------ 777 778 * quintagroup.themetemplate v0.25 compatible with ZopeSkel >= 2.15 779 780 766 781 Changelog 767 782 ========= 783 784 0.25 (2010-06-24) 785 ----------------- 786 787 - Correct version of the pacakge 788 [mylan] 789 - Fix incompatibility wity ZopeSkel>=2.15 790 [mylan] 791 - Updated tests 792 [mylan] 793 768 794 769 795 0.2.2 (unreleased) … … 827 853 828 854 829 Version 0.7830 ----------- 855 0.7 (unreleased) 856 ---------------- 831 857 832 858 * Add uninstall profile to fix skins tool after theme is uninstalled … … 834 860 835 861 836 Version 0.1837 ----------- 862 0.1 (unreleased) 863 ---------------- 838 864 839 865 * Initial import Theme template with nested namespace.
Note: See TracChangeset
for help on using the changeset viewer.