Theming Discogs 6.x

This is the documentation on all the theme override functions in Discogs 6.x.

Modify views output at field level

This is how we can modify view output at field level

There is issue with theme_views_view_field($vars) API that when we implement this we will get error like
views-view-list.tpl.php (File not found, in folder ./), issue reference http://drupal.org/node/363182

We can avoid that issue by overriding function in our template.php. Function name would be THEMENAME_views_view_field__VIEWID__DISPLAY__FIELDNAME

Custom theme for custom form 6.x

This page is about how to create custom layout for your custom form.

Assumptions:

  • Experience with PHP
  • Experience with module writing
  • Experience with theme writing

This document has following structure:

  • Module
    • mymodule.module: function mymodule_menu()
    • mymodule.module: function myformgene()
  • Theme
    • template.php: mytheme_theme()
    • template.php: mytheme_preprocess_myformname()
    • mytemplate.tpl.php

Some strings, functions, etc are prefixed by 'my' to clearly show what you have to define yourself.

During development remember to clear Drupal cache so that it would reread your hooks and theme.

Module

Assume you have created module mymodule. Here you create structure of your form and method of displaying it.

mymodule.module: mymodule_menu()

By default you create menu entry for the form, which further makes structure builder function callback.

function mymodule_menu() {
  return array(
    'mypath' => array(
      'title' => 'My title',
      'page callback' => 'drupal_get_form',
      'page arguments' => array('myformgene'),
      'access callback' => true,
      'type' => MENU_CALLBACK,
    ),
  );
}

Theming Breadcrumb Output HTML

To theme the generated HTML of breadcrumbs in Drupal 6.x, the simplest method is to override the breadcrumb() function by creating a theme_breadcrumb() function of your own, where 'theme' is replaced by the name of your custom theme. For example, if you are using the Garland theme, you would rename this function garland_breadcrumb().

Subscribe with RSS Subscribe to RSS - custom theme