How do I indent text to align neatly

Hello all

I have created several new content types for different information about our business (e.g. the courses we have developed).

At the moment each piece of information displays the heading (label) and then the content. If the content runs over multiple lines I want to indent it. In other words I want two columns of information: the headings (labels) and the content.

How do I do that? I'm new to Drupal and I can't work it out.

Twig - if and content.field

I really feel stupid. I am quite new in drupal (i use drupal 8). I created a new content type with a lot of files. Also i created a new template for the content type.

Now i want to display several fields. That works:
Example: {{ content.field_shops }}

But i also want to add some html, so i wanted to check if there is something in content.field_shops and only let it be displayed if it is like that.

So i tried:
{% if content.field_shops %}{{ content.field_shops }}
{% endif %}

But it does not work ;-(

PHP Scripts in Drupal 8

I inherited several drupal sites that use custom php scripts to query a database and display stuff in a nice formatted Drupal page.

Some quick reading on Drupal 8 suggests this is highly discouraged for a number of reasons, however I'm what an alternative method would be to pull information from a database and display it in a drupal page.

I'm also unable to get a php script to work in Drupal 8, looks like I have make changes to the drupal root .htaccess file to allow the script to execute.

node level permission in Drupal 8?

I don't see any node level permissions inside page content type items. What's the best way to do this? Is it not ported yet? I heard that there was a lot of granular permissions with 8. Am I just not on the right trail yet? Thanks :)

How to display Image url in field-level rest api view

Drupal 8. I have a simple Entity type that has field called "field_image" that references the core Image type. I set up a View with a REST Export for this entity. I configured this endpoint to Show: Fields, then selected the Image field in the list. When hitting this endpoint, the image field is displayed in JSON as actual HTML:

Breadcrumb in Home page

Hi,

I want that the breadcrumb template appear even in the home page.

For now, on the home page, the template isn't included in the configured section. the hook "mytheme_preprocess_breadcrumb" isn't call in the home page neither.

I don't know at all where to change that :

A hook in the .theme file? a configuration thing ?

I found some few class in core to try to understand the logical and find a way to override it, but for now drupal is too complicate for me *.*

EDIT :

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x