How to react to a node save ?

Hi everyone,

I'm on my way to learn the brand new Drupal 8 best practices.

Now I'm confronted to a problem. I have 2 custom content types : contentType1 and contentType2.

I try to programmatically create a new contentType2 node when a contentType1 node is created from the Front Office.

I try to do that with events, this way :

How to translate custom block content or menu items in Drupal 8?

Hi,

I'm trying to find a way to translate custom block content or menu items in Drupal 8, but all I get is an option to translate menu label, menu description and block description. I can't find a way to get to the block content translation the way it worked in Drupal 7.

I have enabled all of the translation modules and ticked eveything at admin/config/regional/content-language.

Is there a way to have two versions of the same block, e. g. one in English and one in Spanish, the same way it was in Drupal 7?

Thank you in advance.

Access sub data in views.

Hi all, (new to drupal so forgive me if this is a simple question)

I cannot find how to access specific fields inside an element.
EXAMPLE:

I made an template for a node field:

{% for item in items %}
{{ item.content }}
{% endfor %}

this works and prints out the needed html < a href="link" >title< /a >

But i want more, so i need more control:

I tried: {{ item.content.title }}, {{ item.content.getTitle }} {{ item.content.get('title') }} {{ item.content.get('title').value }}

Bootstrap Template

Hi! I am building a site with Drupal 8 and I got a Bootstrap template that I'm supposed to integrate as the site's theme. The ZIP includes an index.html, and image, fonts, css and js directories. I'm completely new to Bootstrap and so I'm not sure how I can do this. I was hoping I could use the Bootstrap base theme and just copy the ZIP's content somewhere. But it looks like this is not how this works. Do I have to add the JS and CSS files to a subtheme and create template files according to the content of my index.html from the ZIP?

Attaching a library to the header only as needed

I'm building a new Drupal 8 module. For some reason the jQuery only works when the jQuery library is attached to the header instead of the default footer. While building the module I was attaching the libraries with the following in the file flot_d8.module

Upgrading Drupal 8.0.0-rc2 -> 8.0.1

I have upgraded my site to the Drupal 8.0.1 release (from 8.0.0-rc2), the update.php process ran fine and did not report any errors.

But now my status page has this message:

Mismatched entity and/or field definitions
- The following changes were detected in the entity type and field definitions.
Taxonomy term
- Update the Taxonomy term entity type.

What do i need to do to resolve this? Update.php says that there is nothing to update.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x