![]() ![]() * This is the same name we used on the services.I'm trying to get my head around this: I don't know why the twig debug isn't working: The ReadingTimeExtension.php will contain the following:Īrray('Drupal\readingtime\TwigExtension\ReadingTimeExtension', 'readingTimeFilter') // Here we are self referencing the function we use to filter the string value. However, what I would love to be able to do - is to control all of the individual fields and optional labels for a node - inside the template (my content type machine name is 'tool') I also know that I. I have a site on Drupal 8.7 and I need to add an image that is hosted in my sub theme. |- src/TwigExtension/ReadingTimeExtension.phpĭescription: Provides a Twig filter that calculates the time of reading for any given string.Ĭreate a services file: Ĭlass: Drupal\readingtime\TwigExtension\ReadingTimeExtension I'm familiar with the Drupal 8 theming API, including the hookpreprocessHOOK, as well as all of the theme template suggestions available when Twig debug is enabled. There are templates for each page element ranging from high-level HTML to small fields. Our module is going to have the following structure: Drupal allows you to override all of the templates that are used to produce HTML markup so that you can fully control the markup that is shown as output within a custom theme.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |