Livethemer

The Livethemer module allows you to build your own unique, professional Drupal theme without writing any code.

It provides a point-and-click interface allowing you to modify and enhance your site’s theme — or even build a whole new one from scratch — all without writing any code. Page layouts, backgrounds, colours, typography, block styles… all these aspects and loads more can be styled by Livethemer.

Changing the theme of your website

At the toolbar, Appearance, you will find a list of all themes available on your Drupal site. (See figure A1.9) In a standard Drupal installation you will find four themes:

  • Bartik: This is the standard theme, used for non-administration pages.
  • Seven: This is the theme by default used on administration pages.
  • Garland: This is the default theme used in Drupal 6, ported to Drupal 7 as an alternative to Bartik.
  • Stark: This is a stripped-down theme that could be used as a base theme (see separate section).

Each theme has a set default link, used to set which theme should be used on non-administration pages. Just below the themes list is an option to select which theme should be used on administration pages.


Figure A1.9: The themes overview page allows you to select which theme should be used on your site.

TIP: If more than one theme is enabled, site builders can install ThemeKey or Switchtheme so your users can choose which theme they would like to use. This may be useful to offer a high-contrast theme to users with visual impairments.

Modify attributes of a form field (EXAMPLE: ADD SIZE attribute of a multi select box to make it bigger)

Goal:

ADD(or or modify) an attribute of a form field.
For this example, we'll be ADDING the "size" attribute to a multi select box in a custom content type, with the intent to make the select box bigger, vertically, so that more options are visible at once.

What you'll need to know:

  1. How to create and enable a custom module (not covered here)
  2. my_form_id (The form ID of the form you want to change, see previous page for details)
  3. my_field_name (The field name of the form field you want to modify, see section below for details)
  4. my_content_type (The content type you're changing the fields for. Don't worry if you're not dealing with a content type form, the below info applies to just about any form you'll likely come across).

The resulting code:

/**
 * Implements hook_form_alter().
 */
function mymodule_form_alter(&$form, $form_state, $form_id) {
  if($form_id == 'my_form_id'){
    $form['my_field_name']['#language']['#size'] = '20';
  }
}

The What, Where, and Why:

if($form_id == 'my_form_id')
This IF statement is important if you you do not want to process every form on your site with this modification.

Changes in 7.x-2.x

This page describes the changes between 7.x-1.x and 7.x-2.x branch of Display Suite.

Upgrade warning
Do not upgrade an existing site from 7.x-1.x to 7.x-2.x. Some functionality has been changed, especially on the template level. Both branches are supported, so stick with the same branch once you have chosen one.

UX

Frontend and developers

  • HTML5 support for wrappers (layout, region AND subregion).
  • Templates work on forms now as well, with more support for entities by default.
  • Hide empty region option is gone. There are now fluid regions.
  • Disable sidebars option has moved to extras.
  • Hidden region to put fields on the build, but not print them.
  • Expert template even more flexible.

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.

Pages

Subscribe with RSS Subscribe to RSS - theming