Want to get Lullabot article, videocast, and podcast announcements delivered right to your in-box? Let us know your email address (we won't share it) and we'll let you know when anything exciting happens.

Subscribe to our bi-weekly audio podcast - The Lullabot Drupal Podcast, our daily interview snippets - Drupal Voices, our periodic videocasts, or everything. Just choose your favorite podcast-listening application or service and click away!


Drupal Podcast No. 44: Thinking About Theming

  • Artist: Lullabot
  • Title: Drupal Podcast No. 44: Thinking About Theming
  • Album: Drupal Podcast
  • Year: 2007
  • Length: 77:41 minutes (18.4 MB)
  • Format: Mono 22kHz 33Kbps (VBR)

Jeff Robbins, Angela Byron, Jeff Eaton, Nathan Haug, and James Walker discuss strategies for design and presentation of Drupal sites.

Comments on this post will automatically be closed three months from the original post date.

Comments

IE blues

Hi, thanks for the podcast, the news and the theming help. I always use the zen theme as the basis of my custom themes for clients, and some will be coming out on Drupal showcase "real soon now" :)
One problem I keep running into on IE (even with Drupal 5.2) is that the content area will slip down and to the left, under the left sidebar (using the fixed width centered settings).
Does this happen a lot to other folks? I know it may have to do with the box model, etc., but I thought maybe others have run into this issue from time to time.

Thanks again for the podcast,

Victor Kane
http://awebfactory.com.ar

Zen IE Problem

Hi Victor,

If this is happening on pages with textareas on them (such as node editing pages), then you should be sure to upgrade to Drupal 5.2. This is Zen's "nasty IE bug" that needed to be fixed in core. It has been fixed in 5.2.

Right, no this is something else

No, this persists even with upgrade. T

his is where normal IE "box-model" adjustments cannot prevent the squeeze or somesuch from dropping down below the left sidebar on a fixed width, centered Zen based theme.

It may be very "me" specific, in which case there is no way out except either suicide or hard work (or a combination of both), but then again... I may be lucky and it's a scenario others have seen.

Thanks a lot for responding so quickly.

And thanks again for a podcast particularly chock-full of great pointers.

saludos,

Victor Kane

Nah, that happens to me too..

Once common occurrence is at /admin on IE6 when the screen is less than about 1000 pixels wide. Then the whole text area slides down below the left-nav, and/or smashes in on itself (overlapping text etc, very ugly).

Help?

Hi Victor,

if you email me some details/URLs I might be able to help, I have some experience using the setup you describe. You'll find me easily enough on drupal.org. Is this one of those horrible IE specific things...?

Cheers,
Nik

Finally got it: My zen-saving hack!

Here is how I have finally found a solution for this irksome problem that has stopped me from using the great zen theme.

My problem was being caused (which may be somewhat tautological, since really what it is is that my problem goes away for IE when the following lines are removed, but break Firefox) by the following lines of layout.css, around lines 30-44:

Problem:

/* We must define 100% width to avoid the body being too narrow for near-empty pages */
body #main {
  width: 100%;
  float: left;
}
/* So we move the #main container over the sidebars to compensate */
body.sidebar-left #main {
  margin-left: -210px;
}
body.sidebar-right #main {
  margin-right: -210px;
}
body.both-sidebars #main {
  margin: 0 -210px;
}

Solution is to use the IE6 child selector hack to hide these lines from IE:

/* We must define 100% width to avoid the body being too narrow for near-empty pages */
html>body #main {
  width: 100%;
  float: left;
}
/* So we move the #main container over the sidebars to compensate */
html>body.sidebar-left #main {
  margin-left: -210px;
}
html>body.sidebar-right #main {
  margin-right: -210px;
}
html>body.both-sidebars #main {
  margin: 0 -210px;
}

This is what is working for me, may be due to my own ignorance more than anything, or then again, maybe I found something.

I must now test on IE 7, however, which doesn't parse child selectors like IE 6 did, but then again, may not have the problem in the first place.

Thanks again for everyone's help.

(If anyone wants to get into this deeply, which may not be the case since all of this may be just some quirky corner I've painted myself into) we can also pursue it through drupal.org (victorkane@drupal.org) or awebfactory.

Saludos,

Victor Kane
http://awebfactory.com.ar

IE Doubled Float-Margin Bug?

Hi Victor,

Have you checked the IE Doubled Float-Margin Bug?
Possibly #container and .sidebar (although I have not checked it)

Zen theme question...

I notice there is a .06 release and then there's the 1.x-dev release... the .06 release seems pretty old (Jan '07).

Jeff-- would you recommend using the .06 release or the newer dev release as a starting point for further theming?

Just curious,

W

Nate Rocks

All you Lullabots rock, but Nate is by far the best teacher.

His mention of this http://drupal.org/node/16383 and other stuff he talked about was really useful.

To me, other than messing with HTML and CSS (which has nothing to do with Drupal), the whole challenge in Drupal is getting at the variables you want to print in your template files, so knowing how to get those (or create them) is key.

theming is more

Well said.. Describing theming not as a start-from-scratch but rather "taking something existing, copying it, pasting it into your [template.php], then modifying it" is spot-on and only really made more sense after I saw the drupal stars at http://fourkitchens.com/ demo theming in person. You copy the default theme_hook function out of a given .module file and tailor it appropriately.

I love the content, and am

I love the content, and am enjoying the podcast with the exception of all the giggling. I can barely stand it.

giggle, giggle, giggle...sigh

giggle, giggle, giggle...ahhh

giggle, giggle, giggle...sigh

I love the giggling

Why should everything be so serious, more giggling and hilarity please. You make Drupal fun ;-)

Enjoyed that

Thanks for your podcast, great stuff as usual!

Just a smile

The Lullabot goes to Barcelona

See you and thanks for the good podcasting shows,
Paco

It is wearing a "barretina" the traditional Catalan hat

Podcast issues

Man, I'm having real trouble trying to download your recent podcasts (from episode number 42). I thought it might be itunes, but I downloaded Juice and the download also stops about halfway...Any ideas on how I can figure this out? Is this just happening to me?

Article on theming for beginners?

Thanks for this podcast. Though perhaps still a bit broad for my needs at the moment, I think it will help as I learn to work with Drupal themes.

I'd like to find a good, basic introductory article on Drupal theming--something that helps beginners with little coding experience figure out 1) what they can do to modify existing themes or create themes, and 2) what they need to learn in order to get more control over themes. Most of what I find on Lullabot seems geared toward advanced users. Any chance you'd do a write-up for beginners, or provide recommended links for beginners? Also, do you ever run online theming workshops (again, for beginners)?

29:31 before the topic

29 minutes 31 seconds of news, discussion and giggling before the topic of theming. Wow! Although it's friendly getting to know your personalities, maybe you could have a separate podcast for the news and socializing. Or label the podcast "A Lot of News and Discussion and then Theming that starts at 29:31". One usually expects links to take one to the topic in the label. After 15 minutes I gave up, then returned and downloaded the file, fast forwarded until 30 minutes to eventually find the first discussion of Theming.

Wouldn't separate podcasts for the news and discussion assist users better? Maybe the news belongs on-site. (Maybe the information does, too! But that's another topic...)

Thanks for continuing to explore open source development. We all benefit.

PHPTemplate vs Smarty

Hi all, I'm not sure if many people are still looking into the comments for this Podcast - I'm a little late catching up on old Podcasts. But I did have some questions that I thought I'd throw out there. Basically I was wondering if any had a really convincing argument for using either PHPTemplate vs Smarty Templates? I've used Smarty Templates in the past and really liked the simplicity and straightforwardness of the system. I guess, really, I was curious... do I limit my options using Smarty? It seems that PHPTemplate really gives you the ability to theme every different aspect of the site - for instance having an index page themed different that other sections of the site. Is Smarty more of a one size fits all solution? If I used Smarty would I limit my abilty to style different sections in a different manner? Please excuse my ignorance - I'm just really trying to wrap my head around the different theming engine concept.

Waiting for a baby to arrive listening to lullablog

I think I must get the strangest location for listening to the podcasts .... whilst patiently waiting for our baby to arrive in hospital after my wife was induced. It was a great way to pass the time. Keep up the great work, see you in Barcelona.

We now have a drupal baby at http://kathrynandpaul.blogspot.com/ she also has a drupal site using organic groups at http://www.proudascanbe.com (organic groups are just great for setting up a baby site!)

I think I can detect a Lullably (lullaby) coming up next???

Paul Johnson

is it just me?

Or... was this podcast an utter waste of time with no real value... going on about LOL Templates? 30 minutes AND THEN the somewhat meat & potatoes of the podcast! And how many times does Jeff say 'um...' <-- enough to make me turn off the podcast.

You guys do good work, and thanks for your efforts, but please be a bit more concise...

Thanks

Thanks for your bringing this to our attention. We will try to make the podcast better.