Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 9449

Use it for questions about rendering or modifying the HTML markup produced by a module/theme.

9
votes
2answers
How to add 'first' and 'last' class names in addtion to 'odd'/ 'even' for field collection items in preprocess functions?
asked Feb 27 '14 by Alex
2
votes
1answer
Or: how do I output conditional classes depending on the region a twig template is being rendered?
asked Aug 8 '16 by Alex
0
votes
2answers
I hardly managed it to create theme hook suggestions to work with different bean blocks, so I can use custom .tpl files like: bean--{bundle_name}.tpl.php // currently only bunde is 'zielgruppe' Her …
asked Feb 13 '14 by Alex
3
votes
1answer
I have a block (in Drupal 8) that renders a field of a node. This is my build function: public function build() { $node = $this->getNode(); $build = array(); $markup = array(); $current_lang …
asked Jul 4 '17 by Alex
5
votes
5answers
I've added a custom twig template for links--language-block.html.twig. Inside of it, I want to render additional HTML when the current item is active. But I can't figure out how to check when the cur …
asked May 23 '16 by Alex
0
votes
1answer
I was trying to add another additional column in the menu overview (admin/structure/menu/manage/main-menu). I used the following code: function mymod_form_alter(&$form, &$form_state, $form_id) { …
asked Apr 29 '14 by Alex
2
votes
In Drupal 8 you can use the drupal |render twig filter: {{ myvar|render }} Replace might be used as: {% set customHTML = customHTML|replace({'[content]': content_section}) %} having the variable …
answered Sep 13 '16 by Alex
0
votes
2answers
Is there a way to tell drupal that my module has a theme function which usually only works in my theme? If I write in my theme's template.php: function mytheme_image_style($variables) { // Determ …
asked Aug 14 '14 by Alex
0
votes
1answer
We have a checkbox which's title should have HTML (<sup></sup>) but its rendered as text rather than HTML. How to use HTML in a webform component's title?
asked Feb 28 by Alex
0
votes
1answer
I'm desperately trying to render a style attribute, inside a paragraph's template. But all of these variations: {% set backgroundUrl = content.field_slider_background|render|naked|replace({' ': '', …
asked Jul 4 '17 by Alex
1
vote
1answer
I'd like to set a variable in my node.html.twig template: {% set title = label %} {{ content }} The content consists of one field visible only, which has it's own template: file-link.html.twig Ho …
asked Jun 9 '16 by Alex
0
votes
Okay, so this combination worked... $variables['#cache']['tags'] = ['node:' . $node->id()]; $variables['#cache']['contexts'] = ['route', 'theme']; $variables['#cache']['keys'] = ['entity_view', 'node …
answered Jul 26 '16 by Alex
1
vote
1answer
I just cant figure it out. How can change the title output of a term? I have a content type which displays the selected terms. The term is displayed as a link. How can I change this: <div class="fiel …
asked Jan 24 '13 by Alex
0
votes
1answer
In mytheme_preprocess_menu(), I am altering the main menu: function mytheme_preprocess_menu(&$variables, $hook) { $node = \Drupal::routeMatch()->getParameter('node'); if ('menu__main' == $hook) { …
asked Jul 26 '16 by Alex
1
vote
2answers
I have this block: public function build() { $build = [ '#attached' => [ 'library' => [ 'mymodule/mylibrary', ], ], '#markup' => '<!-- see template -->', ]; ret …
asked Aug 4 '17 by Alex