This forum is for assistance with theme development.

Drupal 8 - Change Save to Submit on form via preprocess

Hello,

I need to change the text of the "Save" button of a node creation form of a certain content type (form is displayed in front-office). I tried this preprocess function :

function mytheme_my_content_type_form_alter(&$variables, &$form){
  if ( isset($form['actions']['publish']) ) {
    $form['actions']['publish']['#value'] = 'Submit';
  }
}

I'm kinda stuck here...

Thanks for your help !

Views Exposed Form Theming

I am trying to theme Exposed Filters Forms , Please help me with some simple steps, how i can add class and id, placeholder etc

Loop trough items in view template and access field values?

I'm extremely new to Drupal so bare with me and excuse any incorrect lingo.

twig: views-view-grid--places.html

I created a new content type called places and added 2 fields (body and field_location). title is a default for fields.

In my view twig, how do I get those values in my for loop?

Bartik Theme Modification

Hi all,

I am trying to modify Bartik theme slightly. Basically, I only need one modification. Namely, here is my problem:

When the field type is the "entity reference", the font for the field label is smaller in compared to other cases (such as field type "datetime" or other).

If anyone has knowledge of where can I make corresponding modifications in css, it would be of high significance for me.

Thanks in advance

Double escape issue in D8? I do what is my book.

Hi all,

I try to exactly follow what is in the book: Drupal8 Theming with Twig (Chumley, Chaz. Drupal 8 Theming with Twig. Packt Publishing, made when it was 8.0.1, I I see in a screenshot. Is it because i did something wrong or because it is now version 8.2.1, but the results with HTML in Views are tagged. In the book, the following should be copied in the rewrite result, overwrite ... text of the image field with this:

Can't clear cache either via interface or drush

Hi all, I'm a complete newb with Drupal (please keep that in mind if answering).

I am trying to theme a site. No matter what I do nothing changes on the front end. I even deleted the .css files form .info with no results. I thought this might be something to do with the cache so tried to clear it. I got a server 500 error.

I then tried to drush cc but got a message saying 'segmentation fault'.

Would anyone know what's going on here?

Pages

Subscribe with RSS Subscribe to RSS - Theme development