(Sorry if that's Drupal 101, but I'm still at the very bottom of the learning curve ..)
I have a custom module, with a routing file that redirects to a path that I have chosen arbitrarily :
grefsearch:
path: 'solr-search/content'
defaults:
_controller: '\Drupal\gref\Controller\GrefSearchController::search'
requirements:
_permission: 'use gref search'
I have another YAML config which describes the View that must be rendered when accessing to solr-search/content
:
langcode: en
status: true
dependencies:
...
page_1:
display_plugin: page
id: page_1
display_title: Page
position: 1
display_options:
display_extenders: { }
path: solr-search/content
cache:
type: none
defaults:
cache: false
cache_metadata:
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
cacheable: false
max-age: -1
tags:
- 'config:field.storage.node.body'
Since the page is completely YAML-based, I do not have a Twig template that is linked to it, and because of that, I cannot use hooks like template_preprocess_page
because I cannot name the function properly.
I'm a bit lost. Should I change the structure I have, and render the page in a Twig template anyway ? Thanks !
hook_page_attachments()
in.module
to attach my library but still no sign of CSS. Is there a trick to see if the css file is properly loaded / attached to the page ?