If you have already gone through Drupal 8: #attached - Part 1, you’ve learned about the library, drupalSettings and http_header sub properties. If not, it’s highly recommended that you go back and learn about it first.
In this post, we will be learning about the following sub properties of #attached:
4. html_head_link
Representation:
- html_head_link is represented as $render_array[‘#attached’][‘html_head_link’]
Description:
- Helps in creating tags under HTML .
- In our routing callback, we have attached a link tag to the page which describes the author of the page.
- Check the screenshot for reference:
5. html_head
Representation:
- html_head is represented as $render_array[‘#attached’][‘html_head’]
Description:
- Helps in creating tags like ,
About the Author
Admin
Leave us a comment