Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
Creating a Drupal 8 website and creating a theme for it (twig templates).
My problem:
I have a field (link URL) where my client can fill in a url-link OR NOT.
Depending if this field is filled in I wanne show a button on the front-end OR NOT.
1. When the field is filled in I want to add some code (a-tag and fixed title) with the URL in my twig template.
2. But if the field is not filled in... the code in the twig template should not be active (appear in source code for visitor).
For Drupal 8 (v8.3.7), you can use its RESTful Web Services module to add the REST export view. This way you will be able to have a REST API to get all pages and articles.
Suppose we have a page called AboutUs, we can get its content via the API:
Is there a way to print raw data in template files of Drupal 8. I know that in drupal 7 we can print and see the available variables from tpl.php files and decide how to use the values to print inside template files.
In Drupal 8, I used Kint or Dump. But i am not getting the data alone to decide how to print the data inside twig. I can understand that this is not as simple as D7. Some times Kint or Dump kills the whole page by loading too much of data.
MCA Denver sought to create a digital experience that is a direct extension of their unique, vibrant identity as a custodian of creative life in Denver, Colorado.
Located in the heart of LoDo, Denver, the museum promotes creative expression, risk-taking, and experimentation through rotating exhibitions and innovative community events. Its exhibitions feature a broad range of work from regional, national and international artists. Its adult and teen programs are refreshingly thought provoking – and a ton of fun.
I have a reverse proxy server (Nginx) used for a Drupal 8 server. The Drupal 8 server has two languages, each assigned to its own sub-domain. The idea is that the proxy server geo-locates the users and, from the same main domain, provides the related upstream sub-domain. I have this working.