I am trying to pass a drupal8 form to Twig template. For this I have created a Twig Extension and call the function from Twig Template. The issue I am facing was the form elements not rendering in Twig template. Also I have directly paste the form html code to Twig file this method also not working. Anyone please help me to resolve this issue.
Following are the code snippets I am using in my custom module.
Hello.
Trying to make the image appear within its node teaser in front page for all nodes of a custom content type. I've searched and found quite a few threads (in this forum and Stack Overflow) but the closer I got was getting the URI to the image folder (not even to the image.
I guess I'd have to edit my 'node-contenttypename.html.twig' but not sure if any other file should be affected.
I have a problem in creating the search box template for my custom template (using Drupal 8).
Basically, the search box has the correct address in the "action" attribute of the "form" element (http://www.mydomain.com/my-site/en/search/site).
But when you click the search button the action url "becomes" wrong (http://www.mydomain.com/en/find/whatever).
I have a block that has some fields that are rendered as part of a content type. In the block twig template file I am trying to render the image as a div background using:
I have also created a field for masthead_image in the content type. However, the image is not being rendered at all. I've checked permissions on the folder where the images are stored and they are 755. Any suggestions would be welcome.
Hi there,
I use Bootstrap and D7 and I need to output two search forms with different design (another placeholder, icon and text for button etc). For single search from I not have any problem, I use theming via form_alter custom function into template.php.
I think, for the problem solving I can output second search form with another ID, then change form via form_alter. But I not have any ideas, how can I render second search form with new form ID.
Anybody help my? Thx for any answer.
Regards, Anatolii.