This forum is for assistance with theme development.

Drupal 8: how to render a form in custom twig/template

I'm looking to add a form inside a custom template. The form, if I open the path registered inside the file cmodule.routing.yml, works but if i try to use it inside a custom template it doesn't work: with a dump(form) or dump(form.anyfield) i get NULL.

cmodule.routing.yml:

Broken theme maybe, new to drupal, need help

website is chemungny.arounja.org.
I am a sysadmin, thrown into website support, i barely know drupal/php, so any help would be appreciated.

Website should load a map with markers,  but getting error, not sure what happened or if something was updated by another user.

Notice: Undefined index: Community in include() (line 116 of /home3/ccnyweb/public_html/sites/all/modules/gmap_dynamic/theme/gmap_dynamic.tpl.php).

Removing container divs around Drupal Views

Hi Everyone,

I have created a couple of Views. One is a slideshow and the other is an unordered list. Everything works as expected. However, I have, in the markup discovered that there are two divs that wrap the view. The first div, has a class of "views-element-container", which stems from the block.html.twig file. The second div comes from the field.html.twig file. Finally, I have the div containing the beginning of my Views. 

menu-expanded is not link when you are in submenu

I create a menu like the https://www.drupal.org

I just realize that when you are to Why drupal -> For developers (https://www.drupal.org/developers) you cannot go to About -> https://www.drupal.org/about

How can be fixed?

How to get image uri from image media fields

I want to add images to my commerce product variants.

I am wondering between using the image type vs media type.

for using the image field,  I have write this twig code to modify img element:

{% set image = product.variation_field_images[0] %}

{% set image = image|merge({'#image_style': 'large'}) %}

{% set image = image|merge({'#item_attributes': { class: 'xzoom', xoriginal: product.variation_field_images[0]['#url'].uri } }) %}

Twig - Get Author ID# in node.html.twig

Is there a way to get the author ID# to display in a node.html.twig file?

I'm trying to link to an author's personal contact form... something like this for example:

<a href="/user/{{ authorid }}/contact">Contact the Author</a>

Thanks!

Pages

Subscribe with RSS Subscribe to RSS - Theme development