[themes] theme dependencies

Warren Vail warren at vailtech.net
Sat Sep 3 17:58:46 UTC 2011


Has any standard set of these functions evolved like listing headers,
odd/even detail lines, line specific buttons, or checkboxes?

 

I would think that themes would eventually need to have a standard set of
these functions in order to avoid losing control over theme
inter-changability, especially when employing things like jquery's
scrollable listings.

 

Warren Vail

  _____  

From: themes-bounces at drupal.org [mailto:themes-bounces at drupal.org] On Behalf
Of David Landry
Sent: Saturday, September 03, 2011 10:21 AM
To: A list for theme developers
Subject: Re: [themes] theme dependencies

 

Ahh, yes a module can declare theme hooks so that other things can theme the
output of the module. It's perfectly safe to use these module-specific theme
hooks in your theme because of the way the drupal hook system works. As far
as the PHP parser is concerned, you're just declaring a new function. If the
module that uses that theme hook is present, it'll call that function to
theme its output. If the module that uses that theme hook isn't there, the
function will never be called.

 

David Landry

On Fri, Sep 2, 2011 at 10:06 PM, Warren Vail <warren at vailtech.net> wrote:

Sorry I miss spoke (or typed).

 

There is mention in many of the Drupal programming books of theming
functions that can be invoked by a module.  I don't understand them fully
yet, but I believe some of them are standard and others may not be.  I
believe the idea is to make sure the theming is kept separate from the data,
even if some of the theming is data dependent (something that proponents of
separation tend discount), a compromise at best.

 

Warren Vail

  _____  

From: themes-bounces at drupal.org [mailto:themes-bounces at drupal.org] On Behalf
Of David Landry
Sent: Thursday, September 01, 2011 5:03 PM


To: A list for theme developers
Subject: Re: [themes] theme dependencies

 

Warren,

 

I'm not sure I understand what you mean by "theming modules." The first
thing that comes to mind is something like HTML5 Tools
<http://drupal.org/project/html5_tools> . The HTML5 Base
<http://drupal.org/project/html5_base>  theme is "designed to go with HTML5
Tools," but HTML5 Tools does its magic before anything reaches the theme
layer, leaving no reason for the theme to call any HTML5 Tools functions.

 

David Landry

 

On Thu, Sep 1, 2011 at 4:38 PM, Warren Vail <warren at vailtech.net> wrote:

David,

 

Doesn't the opposite exist where modules request specific theming modules?
Is there a standard set of theming modules yet, or must you just test to see
if the function exists?

 

Warren Vail

 

From: themes-bounces at drupal.org [mailto:themes-bounces at drupal.org] On Behalf
Of David Landry
Sent: Thursday, September 01, 2011 2:17 PM
To: A list for theme developers
Subject: Re: [themes] theme dependencies

 

It's bad practice for themes to have module dependencies like that. There is
no centralized standard for tracking modules that a theme depends on. You'll
have to go through the entire theme looking for references to modules.

 

If you want to be kind to the next person who has to maintain the site, you
could break out any template code that has module dependency as a custom
module or Feature, so that the module dependencies can be declared.

 

David Landry

On Thu, Sep 1, 2011 at 3:09 PM, Bert Van Kets <mailing at vankets.com> wrote:

Hi all,

is there any easy way to know what modules a theme is depending on?
I have a theme from a Drupal 6 site with a multitude of installed
modules. When I use the theme on a plain vanilla Drupal install a blank
page is installed.
I really do not want to go through all the tpl files to see what modules
are referenced. How is a problem like this tackled?

Thanks.

Bert
_______________________________________________
themes mailing list
themes at drupal.org
http://lists.drupal.org/mailman/listinfo/themes

 


_______________________________________________
themes mailing list
themes at drupal.org
http://lists.drupal.org/mailman/listinfo/themes

 


_______________________________________________
themes mailing list
themes at drupal.org
http://lists.drupal.org/mailman/listinfo/themes

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/themes/attachments/20110903/e9fac966/attachment-0001.html 


More information about the themes mailing list