You are here

README.txt in Domain Access 7.2

README file for Domain Navigation

File

domain_nav/README.txt
View source
  1. /**
  2. * @file
  3. * README file for Domain Navigation
  4. */
  5. Domain Access: Navigation
  6. Navigation block and menu options for Domain Access.
  7. CONTENTS
  8. --------
  9. 1. Introduction
  10. 2. Installation
  11. 2.1 Dependencies
  12. 2.2 Permissions
  13. 3. Configuration Options
  14. 3.1 Link Paths
  15. 3.2 Link Theme
  16. 3.3 Menu Items
  17. 4. Developer Notes
  18. 4.1 domain_nav_render()
  19. 4.2 hook_domainnav()
  20. ----
  21. 1. Introduction
  22. The Domain Access: Navigation module is a small module that generates
  23. a block of themed HTML with links to the currently available domains used
  24. by your site.
  25. The default implementation is a JavaScript-enabled select form that sends
  26. users to a different domain when selected.
  27. ----
  28. 2. Installation
  29. The Domain Navigation module is included in the Domain Access download.
  30. To install, untar the domain package and place the entire folder in your modules
  31. directory.
  32. The Domain Navigation module does not add any database tables.
  33. ----
  34. 2.1 Dependencies
  35. Domain Navigation requires the Domain Access module be installed and active.
  36. ----
  37. 2.2 Permissions
  38. As of 6.x.2.0, Domain Navigation has one permission:
  39. - 'access domain navigation'
  40. This permission allows users to view the Domain Navigation block.
  41. The module also uses the following inherited permission:
  42. - 'access inactive domains'
  43. If the user has this permission, inactive domains are shown and marked with
  44. an asterisk (*).
  45. ----
  46. 3. Configuration Options
  47. When active, the Domain Navigation module provides a block for use with your
  48. Drupal themes. By default, this block presents a Javascript-powered
  49. select list.
  50. If you click 'configure' for the block, you can set the block title (which
  51. is empty by default) and control the following behaviors.
  52. ----
  53. 3.1 Link Paths
  54. Indicates whether to link to the home page of each domain or to the active
  55. url on the domain.
  56. If set to 'Link to site home page' (the default option), all links will go to
  57. http://example.com/, http://one.example.com, and so forth, regardless of the
  58. current url.
  59. If set to 'Link to active url,' all links will go to the equivalent url on the
  60. selected domain. That is, if the user is at http://example.com/?q=node, then
  61. lnks will be written to http://one.example.com/?q=node.
  62. NOTE: Linking to the active url may cause Access Denied messages if users link
  63. from a node page, since Domain Access restricts node views to specific domains.
  64. ----
  65. 3.2 Link theme
  66. Indicates how to format the HTML output. There are three options:
  67. - JavaScript select list
  68. Creates a select-list form that uses JavaScript to goto the selected domain.
  69. Requires JavaScript and does not include a submit button.
  70. Note: This is _not_ a drupal-generated form element.
  71. - Menu-style tab links
  72. Creates a list of links formatted like primary tabs, with the active domain
  73. highlighted.
  74. - Unordered list of links
  75. Creates a simple unordered list of links.
  76. ----
  77. 3.3 Menu Items
  78. The Domain Navigation module creates a group of menu items that correspond to
  79. the home pages of your active domains.
  80. By design, the root menu element is disabled, since it is only used to group
  81. the menu items together.
  82. The designed use-case of the menu is for use as Primary or Secondary links. To
  83. enable this feature, use the following steps:
  84. - Go to 'admin/build/menu'
  85. - Find the Navigation => Domain menu item.
  86. - Enable the menu item.
  87. - Assign the menu item to Primary or Secondary links, as desired.
  88. - Save the changes.
  89. - Disable the top-level 'Domain' menu item, but leave the others intact.
  90. - Sort the menu items so that the active links are at the top level of the menu.
  91. This final step is new in Drupal 6.
  92. NOTE: If you wish to disable the menu entirely, but keep the block functions
  93. for this module, you may edit the following line at the top of the module:
  94. define('DOMAIN_NAV_MENU', TRUE);
  95. If you set this value to FALSE before you install the module, the menu items
  96. will not be created. If you have already installed the module, you may also set
  97. this value to FALSE and then navigate to 'admin/build/menu'. Note that updated
  98. module releases will always reset this value to TRUE.
  99. ----
  100. 4. Developer Notes
  101. Some working notes on the module, which can be invoked by other template
  102. or module files.
  103. ----
  104. 4.1 domain_nav_render()
  105. This function allows you to place the themed HTML in your own module,
  106. theme, or block function call.
  107. Just call:
  108. domain_list_render($paths = 0, $style = 'default');
  109. Where $paths is a boolean flag indicating how to write links to other domains:
  110. 0 == link to home page
  111. 1 == link to current url
  112. And $style indicates which theme function to invoke. Default options are:
  113. 'default' == theme_domain_nav_default()
  114. 'menus' == theme_domain_nav_menus()
  115. 'ul' == theme_domain_nav_ul()
  116. ----
  117. 4.2 hook_domainnav()
  118. The domainnav hook allows other modules to add parameters to the $options
  119. array that is passed to theme functions. It is intended for use with
  120. custom theme functions of theme overrides that you may use.
  121. To use the function, Implements hook_domainnav($domain). You should return
  122. an array of values to append to $options.
  123. Default parameters are passed in the $domain variable and should not be changed;
  124. these are:
  125. domain_id == the unique identifier of this domain
  126. subdomain == the host path of the url for this domain
  127. sitename == the human-readable name of this domain
  128. path == the link path (a Drupal-formatted path)
  129. active == a boolean flag indicating the currently active domain