How to get title of referenced node with node target_id in twig?

Hi,

In my twig template I have

element

which - surprise - holds the hell of an objects.

I can get referenced node url by

{{ path('entity.node.canonical', {'node':  element['#object'].field_article_links.0.value.target_id}) }}

where 'field_article_links' is the custom field added to Article content type and it holds references to other nodes, and 0 is the first element - there are many.

How to get title of referenced node with node target_id?

Hi,

In my twig template I have

element

which - surprise - holds the hell of an objects.

I can get referenced node url by

{{ path('entity.node.canonical', {'node':  element['#object'].field_article_links.0.value.target_id}) }}

where 'field_article_links' is the custom field added to Article content type and it holds references to other nodes, and 0 is the first element - there are many.

Please help me with Best practices to design a new theme for a Live Drupal 8 Website

I have to rebrand and custom design the theme of a live and running Drupal 8 website. I wondered if there is any best practices post or blog that anybody could share or anybody would want to share their practices for such similar case.

I wanted to create a new sub theme on a suitable base theme.

In my limited experience I imagine if I want to design and test it in my localhost then I have to create a copy of the website in my localhost and then i would have to reinstall the website again on the live server.

How to make drupal installer available for sub directory?

I have my main directory at "C:\xampp\htdocs\drupal", and there are two sites laying there: one for production and one for test:

  • prod: "C:\xampp\htdocs\drupal\prod"
  • test: "C:\xampp\htdocs\drupal\test"

to make this short, I add these to my httpd.conf like:

html email from Drupal 8

Can someone provide me example/help with sending an html formatted email programatically.

Where to add file types allowed

I'm trying to upload an image inline, into a custom block. I can't because it's a different filetype (jpg 2000) 

But I cannot for the life of me figure out where I change that setting to allow other file types. I thought I'd seen it somewhere before.

This is Drupal 8

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x