How to get RAW Html code from my module?

How to get RAW Html code from my module?

I looked around for a few hours but wasn’t able to find any available hooks to get pure raw html code. If you right-click on any webpage and do “get source”, it will give you the raw html output. However, there doesn’t seem to be a function or... read more
How to get RAW Html code from my module?

How to fix a broken or missing block?

On a Drupal 8 site, I see an error on a block which says: This block is broken or missing. You may be missing content or you might need to enable the original module. How can I resolve this error? read more
How to get RAW Html code from my module?

How to alter the welcome message after successfull registration

A message is shown upon successful registration, with the following contents: A welcome message with further instructions has been sent to your e-mail address I would like to change the content of that message and use a different HTML structure, e.g.: <p>Thanks... read more
How to get RAW Html code from my module?

Render key and value of a field

I have a field (list integer) and I would like to render its keys and values. I found field.html.twig but within I only have access to item.content which is the value. I would also like to access the key. I also had a look to theme_preprocess_field(&$variables)... read more
Sort grouping field associated with taxonomy term by weight

Sort grouping field associated with taxonomy term by weight

I’m currently trying to figure out how I can sort the grouping fields(Taxonomy Term) by weight that I have setup on my views. As shown in this screenshot below I have a grouping field that is associated with a taxonomy term. Application Deadline Scholarship... read more
How to get RAW Html code from my module?

Add animation/fade to modal/dialogue box (without using the bootstrap)

The current state of a modal/dialog opening in Drupal 8 (and 7 for that matter) is pretty clunky from a user experience perspect. Leveraging some type of animation/fade would really enhance the elegance + cohesiveness of the modal. I notice bootstrap allows a... read more
How to get RAW Html code from my module?

Pager labels aren’t translated

I have a site using Drupal 8.4.1 with all core language modules enabled, 3 active languages, and where English is the default language. The pager labels (e.g. “Last »”) for my own views aren’t translated, although the string “Last »” is... read more
How to get RAW Html code from my module?

Continuing an interrupted batch

I’m using a batch job in Drupal 8 to scrape pages from another site to import. I’m using httpClient, and I have it wrapped in a try/catch. try { $response = Drupal::httpClient()->get($parts[‘scheme’] . ‘://’ .... read more
How to get RAW Html code from my module?

RewriteRule causing internal redirect limit error

I am trying to server a static HTML site from /sites/default/files/staticsite and make it available via a subdomain. I’m hosting the site on Acquia Cloud, and their docs describe Maintaining a static microsite alongside Drupal’s docroot. This solution is... read more
How to get RAW Html code from my module?

Pass variables from controller to existing node template file

In the Drupal 8 documentation I have found a way how to pass variable from controller to custom twig template https://www.drupal.org/docs/8/theming/twig/create-custom-twig-templates-from-custom-module test_twig.module function test_twig_theme($existing, $type, $theme,... read more
How to get RAW Html code from my module?

Reference View in Entity Reference field

I have a content type that has an entity reference field allowing you to link to other pages and add a custom image, for nice big CTAs. However, it’s come to light that some of the links may need to be to Views that show content as a list or map. The ER field... read more
Filters as rewrite results link path parameters

Filters as rewrite results link path parameters

I am currently using this approach to link lists view’s rows to detail pages in Drupal 8 I would like to pass the entity title of the row to the receiving page and use that to select view blocks having that title. In this case something like... read more
Cannot add CSS class to views field

Cannot add CSS class to views field

I have a view in Drupal 8, and have configured a field in the view to have a custom CSS class. The field I am adding the class to is an image. Under Style Settings I have chosen “Customize field HTML” and “Create CSS class”. When I inspect the... read more
How to get RAW Html code from my module?

How to get token of parent entity in paragraph?

I have a paragraph, which is referenced by a node. Now I am trying to pass field values of node to the paragraph using tokens. I’m only aware of [paragraph:parent_id] and [paragraph:parent_type] but don’t know how to get specific field values. What... read more
Geofield Map – Filter attachment result by clicking marker

Geofield Map – Filter attachment result by clicking marker

I’m facing a problem with geofield map and I can’t find a solution. So I have a view with a geofield map format. There I show all nodes from one node type as markers. Under my map I have an attachment also with all nodes, but as a list with more details.... read more
How to get RAW Html code from my module?

How to add a width attribute to a responsive image with srcset?

When using a responsive image with srcset the width and height attributes are not available in twig. Both of them are NULL When an image is uploaded that is too small images are stretched or blown up as described in this post: Responsive Images, The sizes Attribute,... read more
How to get RAW Html code from my module?

Change a paragraph link field title at runtime

We have a site with numerous paragraphs, one of which is a Call-to-action, comprised of a title, summary and a link field (machine name: field_link). The CTA is used so much that to change the word ‘Enquire’ to ‘Inquire’ for when we are on a US... read more
How to get RAW Html code from my module?

How do I allow full HTML while rendering a view?

Some HTML code like <iframe> is stripped out. How can I allow full HTML in a view? $options = array( ‘id’ => ‘area_text_custom’, ‘table’ => ‘views’, ‘field’ => ‘area_text_custom’,... read more
How to get RAW Html code from my module?

How can I limit the allowed quantity in the cart to one item?

I am using Drupal 8/Commerce 2. How do I limit the quantity in the cart to one item so that users can’t order more than one item per order. read more
How to get RAW Html code from my module?

Unable to save content language configuration

My Drupal 8 website is multilingual and has many entity type bundles for nodes, taxonomy terms, paragraphs, media et cetera. This leads to a content language settings form (admin/config/regional/content-language) with more than thousand translatable-checkboxes.... read more