You are here

README.txt in Viewfield 8.3

Same filename and directory in other branches
  1. 5 README.txt
  2. 6.2 README.txt
  3. 6 README.txt
  4. 7.3 README.txt
  5. 7.2 README.txt
CONTENTS OF THIS FILE
---------------------

 * Introduction
 * Requirements
 * Installation
 * Configuration
 * Maintainers


INTRODUCTION
------------

Viewfield provides a field that holds a reference to a View and renders it
whenever the entity containing the field is displayed. Essentially Viewfield
provides a way to display a view as part of any entity.

 * For a full description and more information on the module visit
   https://www.drupal.org/node/1210138

 *  To submit bug reports and feature suggestions, or to track changes visit
   https://www.drupal.org/project/issues/viewfield


REQUIREMENTS
------------

This module requires no modules outside of Drupal core.


INSTALLATION
------------

Install the Viewfield module as you would normally install a contributed Drupal
module. Visit https://www.drupal.org/node/1897420 for further information.


CONFIGURATION
-------------

    1. Navigate to Administration > Extend and enable the Viewsfield module.
    2. Navigate to Administration > Structure > Content types > content type to
       edit] > Manage fields and add a new field. Select "Viewfield" from the
       dropdown, provide a label name, and Save and continue.
    3. From the "Field settings" tab choose the number of field values (distinct
       view displays) to be stored and Save field settings.

Assigning field values:
    1. Navigate to Administration > Structure > Content types > [content type to
       edit] > Manage fields and select the "Edit" tab. There is an opportunity
       to provide Help text.
    2. For each Viewfield, select a View and Display from the dropdown menus.
       in the "Arguments" field, a comma-delineated list of arguments
       (contextual filters) can be entered. The argument list may contain tokens.
    3. Selecting the "Always use default values" checkbox means the Viewfield
       will always use the provided default value(s) when rendering the field,
       and this field will be hidden in all entity edit forms, making it
       unnecessary to assign values individually to each piece of content. If
       this is checked, a default value must be provided.
    4. To restrict the views available for content authors, check one or more
       views from the "Allowed views" list. To allow all views, leave all the
       boxes empty.
    5. To restrict display types for content authors, check one or more boxes in
       the "Allowed display types" list. To allow all display types, leave all
       the boxes empty.

Manage Display settings:
    1. Navigate to Administration > Structure > Content types > [content type to
       edit] > Manage display.
    2. Select the edit gear for the viewfield. There are options to render the
       view display title, the options are: Above, Inline, Hidden, and Visually
       Hidden.
    3. There is an option to produce renderable output even if the view produces
       no results. This option may be useful for some specialized cases, e.g.,
       to force rendering of an attachment display even if there are no view
       results. Select "Always build output" to capture this feature.
    4. If "Always build output" is selected, there will be an option to output
       the view display title even when the view produces no results.The option
       are:
       Above, Inline, Hidden, or Visually Hidden. This option has an effect only
       when "Always build output" is selected.

Twig theming:
Viewfield provides default theming with the viewfield.html.twig file and
viewfield-item.html.twig templates, which may each be overridden. Enable Twig
debugging to view file name suggestions in the rendered HTML.

CSS styling:
In addition to the core field CSS classes, Viewfield adds "field__item__label"
for view titles. Because Drupal core does not provide default styling for
fields, Viewfield likewise does not provide any CSS styles. Themes must provide
their own styling for the "field__item__label" class.


MAINTAINERS
-----------

 * keithm - https://www.drupal.org/u/keithm
 * Daniel Kudwien (sun) - https://www.drupal.org/u/sun

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Requirements
  5. * Installation
  6. * Configuration
  7. * Maintainers
  8. INTRODUCTION
  9. ------------
  10. Viewfield provides a field that holds a reference to a View and renders it
  11. whenever the entity containing the field is displayed. Essentially Viewfield
  12. provides a way to display a view as part of any entity.
  13. * For a full description and more information on the module visit
  14. https://www.drupal.org/node/1210138
  15. * To submit bug reports and feature suggestions, or to track changes visit
  16. https://www.drupal.org/project/issues/viewfield
  17. REQUIREMENTS
  18. ------------
  19. This module requires no modules outside of Drupal core.
  20. INSTALLATION
  21. ------------
  22. Install the Viewfield module as you would normally install a contributed Drupal
  23. module. Visit https://www.drupal.org/node/1897420 for further information.
  24. CONFIGURATION
  25. -------------
  26. 1. Navigate to Administration > Extend and enable the Viewsfield module.
  27. 2. Navigate to Administration > Structure > Content types > content type to
  28. edit] > Manage fields and add a new field. Select "Viewfield" from the
  29. dropdown, provide a label name, and Save and continue.
  30. 3. From the "Field settings" tab choose the number of field values (distinct
  31. view displays) to be stored and Save field settings.
  32. Assigning field values:
  33. 1. Navigate to Administration > Structure > Content types > [content type to
  34. edit] > Manage fields and select the "Edit" tab. There is an opportunity
  35. to provide Help text.
  36. 2. For each Viewfield, select a View and Display from the dropdown menus.
  37. in the "Arguments" field, a comma-delineated list of arguments
  38. (contextual filters) can be entered. The argument list may contain tokens.
  39. 3. Selecting the "Always use default values" checkbox means the Viewfield
  40. will always use the provided default value(s) when rendering the field,
  41. and this field will be hidden in all entity edit forms, making it
  42. unnecessary to assign values individually to each piece of content. If
  43. this is checked, a default value must be provided.
  44. 4. To restrict the views available for content authors, check one or more
  45. views from the "Allowed views" list. To allow all views, leave all the
  46. boxes empty.
  47. 5. To restrict display types for content authors, check one or more boxes in
  48. the "Allowed display types" list. To allow all display types, leave all
  49. the boxes empty.
  50. Manage Display settings:
  51. 1. Navigate to Administration > Structure > Content types > [content type to
  52. edit] > Manage display.
  53. 2. Select the edit gear for the viewfield. There are options to render the
  54. view display title, the options are: Above, Inline, Hidden, and Visually
  55. Hidden.
  56. 3. There is an option to produce renderable output even if the view produces
  57. no results. This option may be useful for some specialized cases, e.g.,
  58. to force rendering of an attachment display even if there are no view
  59. results. Select "Always build output" to capture this feature.
  60. 4. If "Always build output" is selected, there will be an option to output
  61. the view display title even when the view produces no results.The option
  62. are:
  63. Above, Inline, Hidden, or Visually Hidden. This option has an effect only
  64. when "Always build output" is selected.
  65. Twig theming:
  66. Viewfield provides default theming with the viewfield.html.twig file and
  67. viewfield-item.html.twig templates, which may each be overridden. Enable Twig
  68. debugging to view file name suggestions in the rendered HTML.
  69. CSS styling:
  70. In addition to the core field CSS classes, Viewfield adds "field__item__label"
  71. for view titles. Because Drupal core does not provide default styling for
  72. fields, Viewfield likewise does not provide any CSS styles. Themes must provide
  73. their own styling for the "field__item__label" class.
  74. MAINTAINERS
  75. -----------
  76. * keithm - https://www.drupal.org/u/keithm
  77. * Daniel Kudwien (sun) - https://www.drupal.org/u/sun