Toolbar Themes

Toolbar Themes is a contributed module for Drupal 8. It includes a number of stylised themes that apply only to the Drupal 8 Toolbar.

The main purpose of this module was to replicate the old D7 Admin Menu style, since D8 cores toolbar takes up a lot of screen realestate and for power users the icons and most of the tabs are not required.

Theming with Profile2

User-profile.tpl.php

If you are designing a custom template for your user profile pages and are using the Profile2 module, you probably are looking to add your custom fields to the user-profile.tpl.php template. Here is how this can be accomplished.

This assumes that you have a Profile2 profile type called my-profile. You may easily load your fields into your custom user-profile.tpl.php by printing them like this:

Pass the theme path to javascript

Description

This extends Drupal.settings allowing you to get the theme path in a javascript file

Steps

Add a preprocess function to your theme's template.php

Using drupal_add_js we extend Drupal.settings in order to make it a variable that returns the path to the theme

p.s. don't copy the php tags into template.php just what's inside.

Pass the theme path to javascript

Description

This extends Drupal.settings allowing you to get the theme path in a javascript file

Steps

Add a preprocess function to your theme's template.php
Using drupal_add_js we extend Drupal.settings in order to make it a variable that returns the path to the theme

p.s. don't copy the php tags into template.php just what's inside.

Subscribe with RSS Subscribe to RSS - template