[documentation] [Documentation feature] Basic Theming

Gary Feldman drupal-docs at drupal.org
Fri Jun 23 15:36:34 UTC 2006


Issue status update for 
http://drupal.org/node/70393
Post a follow up: 
http://drupal.org/project/comments/add/70393

 Project:      Documentation
 Version:      <none>
 Component:    User Guide
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  pcwick
 Updated by:   Gary Feldman
 Status:       active

Sigh.  Sorry about that.  Yet another reason for my belief that
per-comment titles are worse than useless.  I don't know why I did that
- I always ignore the titles when reading, and usually ignore that field
while replying.  I think the difference is that the forums leave the
title blank, while the issues section prefills the field.  But the fact
that the email notification uses the new comment title instead of the
base title is a bug in the email notification, which I'll try to
report. </end mini-rant>


Late last night, I started thinking in terms of an outline for an intro
to themes, and here's what I came up with:



* /Overview of the theme system/

* Themes are about the look and feel
* In Drupal, themes are are implemented via theme engines.  We're only
going to discuss the default, PHPTemplate.
* An individual (PHPTemplate) theme can have .css files, tpl.php files,
image files, .js files, and a general template.php file.  They don't
necessarily have to have all of these.


* /Easy theming using only CSS/

* Because of the power of CSS, a large amount of customization can be
done using just .css files, without having to write any PHP
* Drupal follows conventions for classes and ids that facilitate
theming with just CSS.  Here's the convention: /<insert relevant parts
of the aforementioned note by panatlantica>/
* Here's a basic example for blocks.
* Here's another example for node content


* /Theme hooks/

* intro and examples about theme hooks...


If this seems to make sense, I'd be happy to work on a section.  If
stuff like this already exists, I haven't found it.


Regards,


Gary




Gary Feldman



Previous comments:
------------------------------------------------------------------------

Fri, 23 Jun 2006 01:01:15 +0000 : pcwick

I'm not familiar with the way things work here in the documentation
area.  Not sure this is the appropriate way to make this request,
though I think it is a valid request.


I am thinking that a section titled "Basic Theming" might be well
placed under the  "Customizing and Theming" section.


I believe a comment by panatlantica should be a page in "Basic
Theming".
http://drupal.org/node/56574#comment-112329


This single post would have saved me many hours and much frustration
about 12 months ago.  Even today, it clarified the concept for me.


I believe I will be inspired to expand upon panatlantica's comment with
additional basic theming pages. 


I also note there is no option to select "Customizing and Theming" in
the "Component" drop down on this issue subsmission form.




------------------------------------------------------------------------

Fri, 23 Jun 2006 02:08:46 +0000 : pwolanin

Yes, I agree that such a section would be good- and you (or I) can just
add it!  Go to the handbook and click "Add child page".  See also,
http://drupal.org/node/339


If you have the time just click this link:
http://drupal.org/node/add/book/parent/257


Or maybe it should be here, under "Theme how-to's":
http://drupal.org/node/add/book/parent/22803




------------------------------------------------------------------------

Fri, 23 Jun 2006 03:33:40 +0000 : pcwick

Thanks for the reply.  I have sent a message to panatlantica.  If he
agrees, I will gladly take the time to post the comment to the
handbook.


By title alone, Theming Howto's sounds like a good place to put this
information, however, it took me several minutes to figure out where
theming howto's is located.  


Theme development sounds  more like a section in which to find theming
matters related to coding, and indeed it appears to be just that.  I
suggested "Basic Theming" as a place for fundamentals like how css
works in Drupal.  The stuff a new Drupaler is looking for, and when a
new Drupaler sees the title "Basic Theming" s/he says, "hey, that's
me."  First steps in making a Drupal site one's own.  


If I post the comment, I will try to put it in just such a new
category.  If panatlantica posts his own comment to the handbook, it
will be up to him where it goes, of course.




------------------------------------------------------------------------

Fri, 23 Jun 2006 03:47:00 +0000 : sepeck

If we get content that justifies a new section, then we'll start a new
section.  Not that big a deal.  I just don't want to have sections with
titles and no content.  If you want to collaborate I have a scratch site
you can have rights on to hammer out some content before moving it to
Drupal.org.




------------------------------------------------------------------------

Fri, 23 Jun 2006 04:42:15 +0000 : Gary Feldman

I appreciate the value people might get from this post, but I think it
important that it be edited (and not just to fix the typos).


Part of the problem is that a big chunk of that comment is vanilla CSS
stuff - vanilla in the sense that it applies to CSS anywhere, not
specifically Drupal.  As has already been noted, it can be difficult to
find things in the handbook.  The more that gets put into the handbook
that isn't specific to Drupal, the harder it will be to find things
that are.  


The other problem is that the comment is written specifically around
blocks, while the tactics related to the way Drupal assigns classes and
ids apply everywhere.  So rather than having a page that says "here's
how to exploit classes and ids to customize the appearance of a block",
what's really needed is one that is more general, perhaps with some
HOWTO sections that are more specialized.


Having said that, I expect that many people will find value from notes
like that.  Perhaps there should be a separate section or appendix for
contributed case studies or tutorials that cross the boundaries of
technologies.  


Gary




------------------------------------------------------------------------

Fri, 23 Jun 2006 05:15:12 +0000 : webchick

Title fix; bear in mind when you change the title of issue replies it
changes the title for the whole issue.


I skimmed the notes and while there's a lot of really good info there,
I agree that at least parts of it indeed need to be rewritten a bit so
that it's more like a basic theme tutorial and less like a "helping
this one guy out" post, taken by itself.


Hopefully either panatlantica or pcwick or another interested party can
take this on, as theming introductions are something that's been
identified as an area documentation is lacking for some time.






More information about the documentation mailing list