You are here

README.txt in ThemeKey 6.4

ThemeKey
========

Name: themekey
Authors: Markus Kalkbrenner | bio.logis GmbH
         Carsten Müller | Cocomore AG
         Thilo Wawrzik <drupal at profix898 dot de>
Drupal: 6.x
Sponsor: Cocomore AG - http://www.cocomore.com


Description
===========

ThemeKey is designed to be a generic theme switching module. It
allows you to switch the theme for different paths and based
on object properties (e.g. node field values). It can also be
easily extended to support additional paths or properties, as
exposed by other modules.

Documentation for users and developers is very sparse at the
moment. I hope to complete the docs in the next few weeks.
Thanks for your patience :)


Installation
============

1. Place the entire themekey folder into your Drupal modules/ or better
   sites/x/modules/ directory.

2. Enable the themekey module by navigating to
     administer > modules

3. Bring up the themekey configuration screens by navigating to
     administer > settings > themekey


ThemeKey UI
===========

How to use ThemeKey UI on node forms ...

- Go to admin/settings/themekey/settings/ui to make theme options available
  on node forms, and check off the content types you want to enable the
  options for


ThemeKey Properties
===================

"ThemeKey Properties" adds additional properties to the ThemeKey module.
Download it from http://drupal.org/project/themekey_properties


For Developers
==============

HOOK_themekey_properties()
  Attributes
    Key:    namespace:property
    Value:  array()
            - description => Readable name of property (required)
            - validator   => Callback function to validate a rule starting with that property (optional)
                             TODO: describe validator arguments and return value
              static      => true/false, static properties don't occur in properties drop down
                             and have fixed operator and value (optional)

  Maps
    Key:    none (indexed)
    Value:  array()
            - src       => Source property path (required)
            - dst       => Destination property path (required)
            - callback  => Mapping callback (required)

HOOK_themekey_global()
  Global properties
    Key:    namespace:property
    Value:  property value (scalar value or array of scalar values)

HOOK_themekey_paths()
  Paths
    Key:    none (indexed)
    Value:  array()
            - path      => Router path to register (required)
            - callbacks => Load (and/or match) callback (optional)
              (the callback function can set the 'theme' element in $params array directly, which will be applied)
              Callback arguments:
              - $item:    array of elements associated with the path/callback
              - $params:  array of parameters available for load callback

HOOK_themekey_load_validators()
  include files containing validators

File

README.txt
View source
  1. ThemeKey
  2. ========
  3. Name: themekey
  4. Authors: Markus Kalkbrenner | bio.logis GmbH
  5. Carsten Müller | Cocomore AG
  6. Thilo Wawrzik
  7. Drupal: 6.x
  8. Sponsor: Cocomore AG - http://www.cocomore.com
  9. Description
  10. ===========
  11. ThemeKey is designed to be a generic theme switching module. It
  12. allows you to switch the theme for different paths and based
  13. on object properties (e.g. node field values). It can also be
  14. easily extended to support additional paths or properties, as
  15. exposed by other modules.
  16. Documentation for users and developers is very sparse at the
  17. moment. I hope to complete the docs in the next few weeks.
  18. Thanks for your patience :)
  19. Installation
  20. ============
  21. 1. Place the entire themekey folder into your Drupal modules/ or better
  22. sites/x/modules/ directory.
  23. 2. Enable the themekey module by navigating to
  24. administer > modules
  25. 3. Bring up the themekey configuration screens by navigating to
  26. administer > settings > themekey
  27. ThemeKey UI
  28. ===========
  29. How to use ThemeKey UI on node forms ...
  30. - Go to admin/settings/themekey/settings/ui to make theme options available
  31. on node forms, and check off the content types you want to enable the
  32. options for
  33. ThemeKey Properties
  34. ===================
  35. "ThemeKey Properties" adds additional properties to the ThemeKey module.
  36. Download it from http://drupal.org/project/themekey_properties
  37. For Developers
  38. ==============
  39. HOOK_themekey_properties()
  40. Attributes
  41. Key: namespace:property
  42. Value: array()
  43. - description => Readable name of property (required)
  44. - validator => Callback function to validate a rule starting with that property (optional)
  45. TODO: describe validator arguments and return value
  46. static => true/false, static properties don't occur in properties drop down
  47. and have fixed operator and value (optional)
  48. Maps
  49. Key: none (indexed)
  50. Value: array()
  51. - src => Source property path (required)
  52. - dst => Destination property path (required)
  53. - callback => Mapping callback (required)
  54. HOOK_themekey_global()
  55. Global properties
  56. Key: namespace:property
  57. Value: property value (scalar value or array of scalar values)
  58. HOOK_themekey_paths()
  59. Paths
  60. Key: none (indexed)
  61. Value: array()
  62. - path => Router path to register (required)
  63. - callbacks => Load (and/or match) callback (optional)
  64. (the callback function can set the 'theme' element in $params array directly, which will be applied)
  65. Callback arguments:
  66. - $item: array of elements associated with the path/callback
  67. - $params: array of parameters available for load callback
  68. HOOK_themekey_load_validators()
  69. include files containing validators