background preloader

Overview of theme files

Overview of theme files
Last updated February 5, 2015. Created on August 28, 2007.Edited by heather, dustise, er.pushpinderrana, drupalshrek. Log in to edit this page. A theme is a collection of files that define the presentation layer. You can also create one or more "sub-themes" or variations on a theme. Drupal 6 Drupal 7 .info (required) All that is required for Drupal to see your theme is a ".info" file. The internal name of the theme is also derived from this file. Info files for themes are new in Drupal 6. template files (.tpl.php) These templates are used for the (x)HTML markup and PHP variables. Note: The theme registry caches information about the available theming data. template.php For all the conditional logic and data processing of the output, there is the template.php file. Sub-themes On the surface, sub-themes behave just like any other theme. Drupal 5 and below required sub-themes to be in sub-directories of the parent theme. Others Looking for support? Related:  Drupal

Creating Custom Regions | My Drupal Blog UPDATE The following tutorial covers the creation of custom regions in Drupal 5 themes. If you are using Drupal 6 please see the newer creating custom regions in Drupal 6 themes instead. All Drupal themes you download will come with a number of pre-defined regions into which you can already place blocks (normally header, left-sidebar, content, right-sidebar, footer), but it can sometimes be useful to create your own. This can seem a little daunting at first, but it's really just a simple two-step process: step 1 - define the custom region in your template.php filestep 2 - add the custom region to your page.tpl.php file So, lets see how it works. Step 1 - define the custom region in your template.php file All themes should have a template.php file contained within the theme folder. Open the template.php file in your chosen editor and locate the function titled 'function nameoftheme_regions' (where nameoftheme will be the name of the theme to which you are adding a custom region).

Ubercart Ubercart is the most popular Drupal E-Commerce platform for your website. It implements everything you need to start selling products online. Web Developers from all skill ranges can use it to support a variety of E-Commerce industries-- including physical goods, digital downloads, or even subscription based billing services. Ubercart can do it all! For more details, be sure to visit the What is Ubercart? page for more info. Current Features: Ubercart is PayPal certified and integrates PayPal Website Payments Standard, Website Payments Pro, and Express Checkout. You are responsible to ensure your merchants and customers are protected from online payment fraud. Support & Issue Tracking Ubercart maintains a customized support forum at the community site. (Please note: the issue tracker enabled here at is for specific bug reporting and documentation deficiencies only. In addition to the forums, community members regularly hang out in #drupal-ubercart on

Créer un thème Drupal avec des CSS, et rien d'autre Traduction de la page publiée / actualisée le 11 Mars 2011 sur Dans Drupal 6 et Drupal 7, plusieurs améliorations du core facilitent la tâche des concepteurs de thème qui travaillent en CSS et ne touchent pas au code PHP. Le thème Stark a été créé pour aider les concepteurs à connaître le code xhtml généré par Drupal, il fait partie du core de Drupal 7. Les concepteurs de thèmes peuvent maintenant réaliser de superbes thèmes uniquement avec des CSS. Ce tutoriel vous montrera comment créer, en quelques étapes simples, votre propre thème Drupal 6 ou 7 à base de CSS. Etape n° 1 : créer le dossier du thème et le fichier .info La première étape dans la réalisation d'un thème est de créer le dossier où il sera enregistré, et créer le fichier .info pour informer Drupal de son existence. Pour créer le dossier : Créez ce dossier dans le dossier /sites/all/themes Nommez-le votretheme, tout en minuscules Pour créer le fichier .info * Notes :

Building Custom cTools Plugins in Drupal 7 cTools is one of those critical Drupal 7 modules many others depend on. It provides a lot of APIs and functionality that makes life easier when developing modules. Views and Panels are just two examples of such powerhouses that depend on it. cTools makes available different kinds of functionality. In this article, we are going to take a look at cTools plugins, especially how we can create our very own. Introduction cTools plugins in Drupal 7 (conceptually not so dissimilar to the plugin system in Drupal 8) are meant for easily defining reusable bits of functionality. If you’ve been developing Drupal sites for more than a year you’ve probably encountered cTools plugins in one shape or form. However, all of the above are to a certain extent a black box to many. The final code (+ a bit more) can be found in this repository if you want to follow along. The block_plugin module First, let’s create our file to get started with our module: Simple enough. The plugin type <?

Jello Exposure | Christian Zuckschwerdt's blog Submitted by zany on Fri, 08/22/2008 - 23:17 A very light and bright Drupal theme using the Zen framework. The main color is pure white with delicate gray highlights. The main feature here is a Jello-style layout for Zen. The theme for this site uses the layout.css, try resizing the browser to get an impression of the Jello effect. The actual theme specific css is just lightly themed to present it in a nice way. There is one simple change to the page.tpl.php file, a div#float-wrap is added to wrap the main content and left sidebar so they can be grouped against the right sidebar. The bulk of code is in the layout.css, here are the main changes to the zen/layout-liquid.css as pseudo diff: There is some more rigid vs. elastic positioning, but that's about it.

10 Steps to Creating A CTools Modal Window with Drupal 7 | Managed Drupal and Wordpress Hosting Modal windows are excellent design features because it allows you to easily display more information on a page without causing the inconvenience to the audience by making them load an entirely different page. I use modals where I want to display more information that isn't voluminous enough to merit a separate full page load. Figure 1: These are links of titles, generated by a view that when clicked trigger a modal window with additional content. Figure 2: After clicking on a link as shown in figure 1, a modal window appears with additional information. There are two general ways to easily create modals in Drupal. The first, and common method is to use the ColorBox or the Lightbox2 modules. For more control over theming and content of the modal, and gain knowledge of how modal windows work, I took the plunge into Earl Miles' (aka Merlin of Chaos) Chaos Tools, or CTools method of modal creation. This tutorial requires an intermediate to advanced level of understanding of Drupal 7. 1. 2. <?

Breaking Drupal 7 Webforms into Multiple Steps the Easy Way | Envision Interactive | Dallas, TX I recently played the role of Information Architect on a site remodel. We were charged with the task of doing a brand new build to replace an existing Flash site. One of the priorities of the client was to retain the elaborate Request for Quote form. There were many, many form fields that comprised this web form so I began to ponder if we should break the form up into a multiple step form, to improve the overall user experience. After careful consideration, I decided that we should definitely split the form up (for more on this matter check out Pagination in Web Forms | Evaluating the Effectiveness of Web Forms on Module or Theme? I feel like I ask myself that question at least 10 times a day. Set up the webform The first thing we need to do is make sure the Webform module is enabled, and create a Weform node. Download the plugin Next we’re going to download the FormToWizard plugin. Include the plugin Initiate the plugin Include the init javascript Spiff it up Create custom CSS

Is there a way to display the product image as a radio button instead of a select box when selecting a product in a product display? current community your communities Sign up or log in to customize your list. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Drupal Answers Ask Question Drupal Answers is a question and answer site for Drupal developers and administrators. Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Is there a way to display the product image as a radio button instead of a select box when selecting a product in a product display? 2 Answers active oldest votes Your Answer Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Linked Example of how to configure contextual filters with taxonomy using php arguments to display a view of commerce products? Related change of select list to radio buttons question feed