This forum is for assistance with theme development.

How to change the "Add comment" form in Drupal 8?

I have poor knowledge in development with Twig (and with Drupal so). I would remove label before text field and maybe change labels before name and e-mail fields to images. How can I do that? So where can I read about it?

Assign htaccess to theme

Hi all,

Is there a way to assign .htaccess file (or code inside) to a custom created theme? So for example, I could have different .htaccess file for each Drupal theme?

file name suggestion

I made a customized page by VIIEWS structure that has customized path address for example: path/mypage

I used debug and file name suggestion for this page:

-- FILE NAME SUGGESTIONS:
* page--mypage.html.twig
x page.html.twig
--

-- BEGIN OUTPUT from 'core/themes/mystyle/templates/page.html.twig' --

and i made "page--mypage.html.twig" file in output address but drupal cant load this and the main file for this page is "page.html.twig" still

I cleaned cash too.

Theming contact form

Hi every one, i spent the day fighting and don't get the solution :(
I would like in my form--contact-us.html.twig get all my fields and their labels but separately, for now i have something like :

{{ element.group_info.field_issuer_civility }}
{{ element.group_info.field_issuer_last_name}}
{{ element.group_info.field_issuer_first_name}}
{{ element.group_info.field_email_contact}}

{{ element.form_id }}
{{ element.form_build_id }}
{{ element.form_token }}
{{ element.actions.submit }}

Checking for html string quantity in a field item

i have a custom field template "field--my-field.html.twig" in there i am displaying the content on the field like this:

<div{{ item.attributes.addClass('field__item') }}>{{ item.content }}</div>

what i want to do is check the rendered html for the quantity of <p> tags that are present and if i have more than one <p> tag add a class to the parent.

this is how i picture it but this code is not real:

visual look of page changes when logged out

To start with, I'm a very new user... not familiar with much of Drupal terminology... know nothing about php

So I have been trying to modify a theme to get it to look just like i want it to. So i have made some edits to the css file and making a little progress. But what is happening now is that page appearance changes depending on whether you are logged into the site or not. Appearance changes again when editing or creating new content.

Pages

Subscribe with RSS Subscribe to RSS - Theme development