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.
<?php
function theme_preprocess_page(&$variables) {
drupal_add_js('jQuery.extend(Drupal.settings, { "pathToTheme": "' . path_to_theme() . '" });', 'inline');
}
?>Andromeda Slideshow
Please use the issue queue for support request : http://drupal.org/project/issues/andromeda_slideshow?status=All&categori.... Do not ask for help in the comments here.
The Andromeda theme (7.x-2.x) integrates with the Andromeda Slideshow module. Here's how to build a slideshow with the module.
Download and install the requirements
- Download the Andromeda theme (7.x-2.x) here.
- Download the Andromeda Slideshow module here, extract and put it under sites/all/modules.
- Download the Chaos Tool Suite and the Libraries API module, extract and place them under sites/all/modules.
- Download the Nivo Slider plugin here, extract it and place it under sites/all/libraries. If the libraries folder does not exist, create it.
- You should now have the sites/all/libraries/nivo-slider folder.
Enable required modules
Start Here: Recommended Modules
We recommend you download and install the following modules in order to make the most of your Omega based theme. More on installing modules.
Make sure you are running the latest stable releases of all modules to ensure proper functionality. If you are using dev releases of any of these modules use the dev release for all in order to maintain compatibility.
-
Omega Tools
(requires Ctools) - Omega Tools is a great set of functionality that will help you to easily create and manage your Omega subtheme. This tool is useful in development but should probably be disabled in production environments.
-
Delta
Delta is a powerful tool that allows you to create variations of a theme's settings without having to create a new subtheme. When used with Context, Delta allows you to edit the omega grid, zone, and region settings and create all new layouts based on the various conditions available in Context.
Theming a form with conditional fields
Conditional Fields 2.x for Drupal 6
Conditional Fields 2.x supports theming of forms with conditional fields. The method used is the same outlined here: Theme a CCK input form for CCK2 & CCK3:
<?php
print drupal_render($form['field_controlling']);
print drupal_render($form['field_controlled']);
?>However, if you render the individual elements of the fields separately (like, say, each checkbox of field_controlled), you will have to wrap the elements in a wrapper div. You can use theme_conditional_fields_wrapper for this. An example with a checkboxes controlled field:
Read moreTheming OpenLayers
The following theming functions are available in the OpenLayers 2.x module:
Javascript
These themes are on the JS side.
Drupal.theme.openlayersPopup(feature)
This is the top level theming function for popups. It creates basic wrappers for the title and description in the popup. If you need to theme the output of the title and description variables, please see the PHP functions and the default available Views theme functions. If you wish to change how the popup bubble looks, then look at implementing a new popup behavior.
Drupal.theme.openlayersTooltip(feature)
This is the same sort of thing as Drupal.theme.openlayersPopup(feature) but for the tooltip behavior.
Theming options: beginner, intermediate, advanced
Drupal provides a very flexible theming system. To help you get started, this page lists theming options by skill level, from installing existing themes, through learning by modifying them, to creating your own themes.
The scope of this document is to summarize the many options for the visual style and design of a Drupal site. To learn about building the functionality of a Drupal website, see the complementary overview Site building: beginner, intermediate, advanced.
Read more