Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Dynamic Tag Cloud module provides a Tag Cloud based searching of content. Module provides 2 styles of tag cloud.
- Default - Where tag will be simple listed out with simple styling.
- Index - Where tag will be indexed, sorted and shown based index selected.
CONFIGURATION
Go to Admin >> Structure >> Block layout and place 'Tag cloud block' in desired region. In tag cloud block you can configure:
- Vocabularies - Select which all vocabulary tags should be listed out.
- Style - Style of tag cloud.
- Redirect URL - Set the redirection URL, when user click on the tag. Token is enabled for this redirection URL.
CREATE CUSTOM TAG CLOUD STYLE
To create custom tag cloud style, please follow the below steps:
- In your custom module, create new plugin for TagCloud which inherits TagCloudBase class. Or copy paste DefaultTagCloud.php to your custom module and rename filename, namespace and class.
- Change the following in plugin annotation:
id - Plugin Id, this should be unique. label - Plugin style label. libraries - List of libraries name defined in your module libraries.yml file for your custom tag cloud style. template - Tag cloud twig template details: type - template provider module/theme. In your case it would be 'module' name - Module/Theme which defines the template. In your case it would be your module name. directory - Directory path where twig template resides. file - Twig template name excluding '.html.twig'.
- Implement your logic in build() method.
Supporting organizations:
Project information
- Module categories: Site Structure
- 116 sites report using this module
- Created by manojapare on , updated
- Stable releases for this project are covered by the security advisory policy.
There are currently no supported stable releases.