Lo primero que no me lo reconocía,

crea el fichero /etc/udev/rules.d/70-u2f.rules y añadir:

 

Primero de todo, que Bootstrap en Drupal 7 necesita el módulo jQuery Update.

Luego creameos un bundle de Paragraph y le metemos 2 campos: uno para el título del elemento del acordeón y otro para su contenido.

Yo lo he hecho así:

2 campos en el bundle de Paragraph: titulo y body

 

 

 

 

Podemos usar algo como:

{{  path('entity.node.canonical', {'node': node->id()}) }}

 

fuente: https://www.drupal.org/node/2352331

Primero debemos crear un Controller que sea el que devuelva el json para rellenar el autocomplete.

<?php

namespace Drupal\banners\Controller;

use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Drupal\Component\Utility\Unicode;

$get_authors = function()
{
$_ = [];
foreach ( \Drupal::routeMatch()->getParameter('node')->get("field_autor")->getValue() as $target ){
$_[] = Node::load( (int) $target['target_id'] )->title->value;
}
return $_;
}

This a very common and basic task we can accomplish easily with DrupalConsole.
We need to have a custom module which contains the code for the following items:

  • A controller for giving a url to our HelloWorld page
  • A routing file in which the that url is related to the class of the controller

All of this can be quickly done with the DrupalConsole command generate:controller , but first let's generate our module

DrupalConsole is not only intended for developers. It also can be useful for site builders, themers or sysadmins.

In this short post we'll see a basic task, intended for site builders: creating a new block with an image inside. It can work as a banner or any badge you want to show in your site.

Ok, let's go.
First, we need to create a module for attaching to it the Banner Block code.

 

I usually try to translate DrupalConsole & its book every new version comes out because i mantain the spanish translation of DrupalConsole.

First of all, the best is to synchronize new strings with the following command:

drupal translation:sync

Then you want to

drupal translation:clean

for removing not already necessary strings.

The best way to check fresh changes is doing a pull and executing:

Resulta que es posible utilizar la arroba para especificar un sitio en DrupalConsole en lugar de --target a la manera en la que se indican los aliases en Drush.

Así, un comando como el siguiente es perfectamente válido :D
drupal @blog.local cr

Suscribirse a