{"id":21674365,"url":"https://github.com/drunomics/contextual_views","last_synced_at":"2026-05-13T05:44:36.629Z","repository":{"id":56972476,"uuid":"92040061","full_name":"drunomics/contextual_views","owner":"drunomics","description":"Drupal module that provides contextual views blocks.","archived":false,"fork":false,"pushed_at":"2023-12-15T02:40:47.000Z","size":13,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"8.x-1.x","last_synced_at":"2025-03-16T01:44:55.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.drupal.org/project/contextual_views","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drunomics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-22T10:13:08.000Z","updated_at":"2021-07-29T06:21:40.000Z","dependencies_parsed_at":"2023-12-15T03:38:01.211Z","dependency_job_id":"e68598d5-dac1-4fde-9d66-d43da9af1c00","html_url":"https://github.com/drunomics/contextual_views","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":"0.19999999999999996","last_synced_commit":"8ce3208cfd8900a5c2c295149f558ef3e281f948"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunomics%2Fcontextual_views","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunomics%2Fcontextual_views/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunomics%2Fcontextual_views/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drunomics%2Fcontextual_views/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drunomics","download_url":"https://codeload.github.com/drunomics/contextual_views/tar.gz/refs/heads/8.x-1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244583190,"owners_count":20476233,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T13:44:14.483Z","updated_at":"2026-05-13T05:44:36.599Z","avatar_url":"https://github.com/drunomics.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Contextual Views\n\nDrupal module that provides contextual views blocks.\n\n* Project homepage: https://www.drupal.org/project/contextual_views\n\n## Composer\n\n- It's suggested to install the module via composer:\n\n   `composer require drunomics/contextual_views`\n   \n   The module is also available as `drupal/contextual_views` via the drupal.org\n   release system, however only `drunomics/contextual_views` gets patch level\n   releases. This is as drupal.org does not support semantic versioning for\n   modules yet.\n\n## Installation\n\nInstall as usual, see\n https://www.drupal.org/docs/8/extending-drupal-8/installing-contributed-modules-find-import-enable-configure-drupal-8\nfor further information.\n\n## Usage instructions\n\n* Define a block plugin with the same plugin ID as used automatically. E.g. \n  `views_block:news-news_by_channel` . The pattern is \n  `views_block:{{ view }}-{{ display }}`. This way the defined class will be used\n   automatically instead of the default one. \n* Extend the class `Drupal\\contextual_views\\Plugin\\Block\\ContextualViewsBlock`\n* Define the necessary context on the plugin using annotations, e.g. the node context.\n* Alter the block form to add additional config as needed, e.g. a textfield that \n  contains the name of the field holding the term reference.\n* Override build(), get the context value (e.g. the node), derive the views argument\n  (the taxonomy term) from the context and set it on the view as argument using \n  `$view-\u003esetArguments()`. Then call the parent build.\n \nA complete code example for the described block can be viewed here: https://gist.github.com/fago/f51fe8861919a40c753a03c79a134848\n\n\n## Todos\n\n* Write more documentation\n* Provide a configuration form for satisfying views context based upon available\n  block context.\n\n\n\n## Contributing\n\nAlways use the  [Module issue queue](https://www.drupal.org/project/issues/contextual_views).\n\nDevelopment happens on GitHub using the pull request model:\nin case you are not familiar with that, please take a few minutes to read the\n[GitHub article](https://help.github.com/articles/using-pull-requests) on using\npull requests.\n\nThere are a few conventions that should be followed when contributing:\n\n* Always create an issue in the [drupal.org issue queue](https://www.drupal.org/project/issues/contextual_views)\n  for every pull request you are working on.\n* Always cross-reference the Issue in the Pull Request and the Pull Request in\n  the issue.\n* Always create a new branch for every pull request: its name should contain a\n  brief summary of the ticket and its issue id, e.g **readme-2276369**.\n* Try to keep the history of your pull request as clean as possible by squashing\n  your commits: you can look at the [Symfony documentation](http://symfony.com/doc/current/cmf/contributing/commits.html)\n  or at the [Git book](http://git-scm.com/book/en/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages)\n  for more information on how to do that.\n\nFor further information on how to contribute please refer to\n[the documentation](https://www.drupal.org/contribute/development/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrunomics%2Fcontextual_views","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrunomics%2Fcontextual_views","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrunomics%2Fcontextual_views/lists"}