Skip to main content
removed "Drupal" from the title; removed tags from the title
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Which What is the template file for node add/edit page Drupal 8?

iI need to add extra cssCSS styles for a set of fields in 'jobs'the node add page(Because i need fields in 2 or 3 columns for the )jobs content type,so i'm planning to get but I don't know what template file should I use.I Enabled I enabled Twig debugdebugging, and I tried belowthe following options. I tried editing "page--node--add--jobs.html.twig"

  • page--node--add--jobs.html.twig, but it shows all regions

  • hook_theme(), but the custom template is not getting applied

My code for , but this page shows all regions. I tried Hook_theme,but custom templatehook_theme() is not getting appliedthe following.My code is as below:

 function custom_module_theme() {
  //  dpm("node:".drupal_get_path('module', 'comp_jobs'));  
  return [
    'node-jobs-form' => [
      'render element' => 'form',
      'template' => 'jobs',
      'path' => drupal_get_path('module', 'comp_jobs') . '/templates',
    ],
  ];
}

Can anybody help in finding the properWhat template file. should I use, and how do I tell Drupal to use that?

Which is the template file for node add/edit page Drupal 8?

i need to add extra css for set of fields in 'jobs' node add page(Because i need fields in 2 or 3 columns ),so i'm planning to get template file.I Enabled Twig debug and tried below options. I tried editing "page--node--add--jobs.html.twig" , but this page shows all regions. I tried Hook_theme,but custom template is not getting applied.My code is as below:

 function custom_module_theme() {
  //  dpm("node:".drupal_get_path('module', 'comp_jobs'));  
  return [
    'node-jobs-form' => [
      'render element' => 'form',
      'template' => 'jobs',
      'path' => drupal_get_path('module', 'comp_jobs') . '/templates',
    ],
  ];
}

Can anybody help in finding the proper template file.

What is the template file for node add/edit page?

I need to add extra CSS styles for a set of fields in the node add page for the jobs content type, but I don't know what template file should I use. I enabled Twig debugging, and I tried the following options.

  • page--node--add--jobs.html.twig, but it shows all regions

  • hook_theme(), but the custom template is not getting applied

My code for hook_theme() is the following.

 function custom_module_theme() {
  //  dpm("node:".drupal_get_path('module', 'comp_jobs'));  
  return [
    'node-jobs-form' => [
      'render element' => 'form',
      'template' => 'jobs',
      'path' => drupal_get_path('module', 'comp_jobs') . '/templates',
    ],
  ];
}

What template file should I use, and how do I tell Drupal to use that?

Source Link
rks
  • 399
  • 3
  • 16

Which is the template file for node add/edit page Drupal 8?

i need to add extra css for set of fields in 'jobs' node add page(Because i need fields in 2 or 3 columns ),so i'm planning to get template file.I Enabled Twig debug and tried below options. I tried editing "page--node--add--jobs.html.twig" , but this page shows all regions. I tried Hook_theme,but custom template is not getting applied.My code is as below:

 function custom_module_theme() {
  //  dpm("node:".drupal_get_path('module', 'comp_jobs'));  
  return [
    'node-jobs-form' => [
      'render element' => 'form',
      'template' => 'jobs',
      'path' => drupal_get_path('module', 'comp_jobs') . '/templates',
    ],
  ];
}

Can anybody help in finding the proper template file.