Sam's notebook

Including views in Drupal modules December 17th, 2014, 9AM


Views are included in modules by implementing hook_views_api() and hook_views_default_views() and returning an array of view objects from the latter. The easiest way to construct the view object is to create the desired view via the UI and then export it, saving each exported view into its own function in sites/all/modules/custom/modulename/ and then returning them […]

[No comments] [Keywords: , , , , , ] [Permanent link]