Need help migrating your site to Drupal?
Hi Guys,
I'm trying to add the attribute class in Drupal 8 container but it is not working.
My code:
$form['select'] = array( '#type' => 'container', '#attributes' => array( 'class' => 'table-selector-caption', ), );
Please help me.
This cache_clear_all function is no more in D8 whats the actual replacement for this ?
I want the actual replacement, In D7 I'm using this function as :
cache_clear_all($cid, 'cache_API_NAME_api', TRUE);
to clear the cache from the api.
I want the function which will work similar to this.
Note: I had tried drupal_flush_all_caches() as a replacement of this but it is only clearing the Drupal cache not from the api.
Hello i have interest to know about installation profile and i looking information about this.
This is all what i find and i would like to know more:
https://www.drupal.org/docs/distributions/creating-distributions/how-to-...
In MediaWiki one can link from one internal webpage to another internal webpage by wrapping the text with four brackets.
[[TEXT]]
The output will be a link to a webpage with the same alias as TEXT, in that website.
In Drupal however, there is no such linking mechanism, let along, aliases would sometimes be different than the H1.
I want a variable in menu.html.twig file but it is not working for me.
I have tried this:
This function I have written in my theme's .theme file
/** * @param $variables */ function my_theme_name_preprocess_menu(&$variables) { $account = \Drupal::currentUser(); $variables['current_username'] = $account->getDisplayName(); }
And I am calling this variable in menu.html.twig file like this:
In MediaWiki, I store a few chunks of text in simple templates (templates that don't even have a parameter).
In each relevant article, I call any such text chunk this way:
{{TEMPLATE_NAME}}
How to achieve similar functionality in Drupal?
I thought about creating a block and somehow call it in any relevant node but how to call a block from a node (preferably without creating a view)?