I neeed some conditionals and some fields in content and want to use TWIG syntax for that purpose.
I made a very small (nearly empty) Theme for outputting my fields. But I don't know how to render content.
I have a similar website on WP where I use compile_string in PHP Template.
How to do that in Drupal without writing a Module?
Would it be possible to use template_from_string() to include content as template?
How do I enable the StringLoader?
Our team has individually followed the README file and instructions for creating a subtheme of USWDS (https://www.drupal.org/project/uswds) but it seems that this theme is not setup to inherit styles from the parent theme.
The way they describe it on the project page, it looks as if they are assuming that the USWDS styles will live in your subtheme folder and all of the directions they give have those base theme styles running in your subtheme rather than in your parent theme.
I'm getting familiar with theming in drupal 8, i'm on part of adding libraries to custom theme. In documentation and example themes i see libraries added in form of path to a file located in theme's structure but is it possible to add link to library located on cdn?
For example, that's how it is in themes:
global-styling:
version: VERSION
css:
base:
...
component:
css/components/admin-list.css: {}
But can i make it like this and would it work the way i want it to work?
I'm looking to add a form inside a custom template. The form, if I open the path registered inside the file cmodule.routing.yml, works but if i try to use it inside a custom template it doesn't work: with a dump(form) or dump(form.anyfield) i get NULL.