This forum is for assistance with theme development.

Using theme regions in custom module template.

Hello friends,

I recently purchased a theme for my Drupal website. Inside the theme folder there is -> templates/page--front.html.twig & page.html.twig

The a snippet of the <footer></footer> in page.html.twig looks as follows: 

Overriding user login

For overriding user log in page, add a file "user-login.tpl.php" in your themes "template" directory

then in your themes "template.php" file add code as follow

function YOURTHEMENAME_theme() {
  $items = array();
  
  $items['user_login'] = array(
    'render element' => 'form',
    'path' => drupal_get_path('theme', 'YOURTHEMENAME') . '/templates',
    'template' => 'user-login',
    'preprocess functions' => array(
       'YOURTHEMENAME_preprocess_user_login'
    ),
  );

  return $items;
  
}

Thanks

site_name.theme

Hi,

I was wondering if there is any way to add, in a class that drupal creates,

something that I want from site_name.theme with a function.

For example let's say that I develop a site with bootstrap and some content created

by drupal don't have the bootstrap classes and I want to add them in the class.

How i can do this?

How to pass variable to page--front.html.twig from custom module.

Hello friends,

I have a theme installed on my drupal 8 site. 

The page--front.html.twig located inside the themeFolder/templates looks as follows:

Advice for a new developer

Hello,

I'm working as web developer. My company uses Drupal for site development.

I have the basic knowledge (HTML5, CSS, JS, PHP, Python, Java, C, C++).

After 5 months of work I don't fully understand Drupal, I find it very difficult.

I'm able to develop a custom website from 0 all by myself but I don't know how to

gain more control over the classes drupal generate for views and blocks.

I want to be able to create classes inside custom_name.theme and then assign them as variables, override blocks, alter classes etc.

How to set the front page via custom module.

Hello friends,

I asked a similar question to these under the Module Development and Code questions, but I think this question may actually be better suited under this topic.

I am working on a drupal website that has a theme installed to it.

I would like to set the Front/Home page of the website to a .html.twig template I have in a custom module I am busy working on.

How would I go about doing this? I have done some googling and it likes like the answer lies somewhere with page--front.html.twig, but I am not sure where to go from here.

Pages

Subscribe with RSS Subscribe to RSS - Theme development