Need help migrating your site to Drupal?

How to use global $title_suffix and $title_prefix in Drupal 8 ?

Hi guys, 

I'm converting my Drupal 7 code to Drupal 8 and in Drupal 7 I'm using global $title_suffix variable so how can I use this variable in Drupal 8. 

Please help me. 

Thanks in advance.

Trying to add a class in Drupal 8 container

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.

cache_clear_all is deprecated in D8

Hi Guys, 

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. 

Learning about installation profile

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-...

MediaWiki style linking

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.

Want to create a variable for menu.html.twig

Hi Guys, 

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: 

Pages

Subscribe with RSS Subscribe to RSS - Converting to Drupal