Last active
September 21, 2022 15:28
-
-
Save rosemaryreilman/485f827bc717cbd45ddcc917e41a3431 to your computer and use it in GitHub Desktop.
Custom Node twig template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% set database_content = node.field_database_content.0.value %} | |
| {% set javascript_library = 'ik_maps/map-database-' ~ database_content %} | |
| {% set map_name = node.getTitle() %} | |
| {{ attach_library(javascript_library) }} | |
| <div id="{{ 'map-' ~ database_content }}" class="{{ 'map-database-' ~ database_content ~'__map' }}" data-map-name="{{ map_name ~ ' Map' }}"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment