Theming – How do I access a raw URL from a file field to render in href?

I have a Content Type "Our Employees" that includes a field for uploading a person's CV as a PDF:


I created a view for this content type and then added it to the page using blocks

The branch file that I use to render / format this area is:


I am having trouble with the URL for the file field

I can render it as a PDF icon link as follows:

{{ fields.field_cv_file.content }}

But I want the & # 39; raw & # 39; Get the URL to use in an href, like this:

Download CV

This does not work.

I've tried a few different ways to rewrite the code in href, but none works.

how would I do that

Theming – render HTML in Drupal 8 error messages

I work with Twig templates and often see such messages in my browser when I make a mistake:

The website encountered an unexpected error. Please try again later.

TwigErrorSyntaxError: Unclosed "{". in TwigLexer->lexExpression() (line 153 of themes/mytheme/templates/page.html.twig).
TwigLexer->lexBlock() (Line: 126)
TwigLexer->tokenize(Object) (Line: 705)


Is there a way to automatically render the above HTML instead of having it output as a string? Many thanks.

Theming – Conditional display of suite fields

In D8, I'm trying to use Display Suite fields to create a twig field for outputting an anonymous user string. However, this snippet will also be displayed to logged in users.

{% if not logged in%}
… field content …
{% endif%}

I will also restrict more to user role than to "when logged in".

I tried to create a DS block field, but the rendered d field does not take into account the visibility settings of the custom d block.

Theming – Overriding Drupal 8 View Templates with Context Filter

I have a view that lists links to all pages in a specific content type.

How do I create a template override for this view?

I tried:
Views View Unformatted – My View Name -%. twig.html

And different other combinations.

The view path is: / my-view /%

Nothing seems to work and I googled for an hour for answers. I'm really stuck. I do not know how to override the template.

theming – Returns the term value of the referenced node

Drupal 8 branch
I have content with an entity reference field field_field_data_provider_ref that points to another content that itself contains a buisness_property_type field (single taxonomy term).

{{}} Node.field_field_data_provider_ref.entity.buisness_property_type.value

{{node.field_field_data_provider_ref.entity.buisness_property_type | views}}

does not work for me

Theming – field formatter class and maximum number of characters

I need to put a string of classes into a field (admin / structure / types / manage / article / display) to get a button from a text, but the Field Formatter Class field has a character limit, so I do not type those can code I need to get the result.
I did some research but did not find a solution.

My class:

Any help?

Kind regards

Theming – content in blockiteration Drupal 8 branch

I'm new to Drupal and it's hard to figure out how to add different classes in my code by using for statement in twig, a view that's displayed in a block. Here is my example code


This code returns the node ID instead of the image file and I'm really confused. Would someone please help.

Theming – Drupal 8 – Add inline styles / JS from fields

My site contains nodes that require different styles (and occasionally an inline JS script) and that can customize these styles through the user interface rather than code. These styles are currently implemented using a code-only text box