Skip to main content
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
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
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 not deleted user 28220

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.

0 votes
1 answer
409 views

Create a custom function to convert a field data

In Drupal 8, it's different, and I don't see how to proceed. In my .theme file, I tried to create a custom function. … With drupal 8 how can I proceed to implement a custom function (with args) ? Thanks for your help, and eventualy yours examples. …
user28220's user avatar
  • 109
2 votes
1 answer
3k views

Add classes to the menu item <li>?

In hook_preprocess_menu(), I want to add custom classes to the <li> tag. I tried the following lines of code, one at a time. $item['attributes']->addClass('section'); $item['attributes']->setAttribut …
user28220's user avatar
  • 109
0 votes
1 answer
382 views

Table in custom form + empty values in form_state

In a custom form I created a table element: // Table results. $form['table'] = [ '#type' => 'table', '#header' => $header, '#rows' => $rows, '#attributes' => ['id' => 'table-resul …
user28220's user avatar
  • 109
1 vote
1 answer
2k views

Get node internal path from path alias in Twig template

With Drupal 8, Is there a function to get the internal path from an alias inside a Twig template? In my Twig template I have tried to use the url() function without success... …
user28220's user avatar
  • 109