This forum is for assistance with theme development.

trying to understand Drupal: why there are so many classes and IDs?

Hi all, this is my first post and english isnt my native language, so please, be nice and patient. Thanks.

Few weeks ago I started to learn (slowly and patiently) how to install, configure and customize Drupal/CivicSpace.
During this time, I felt sick and angry and very disappointed more than once. But from time to time, while learning Drupal, I have some "insights", and things about Drupal becomes more clear. I'm feeling quite masochist and I dont know why insist with Drupal. It has become a challenge and I really want to fully understand Drupal.

So, after this introduction, I would appreciate if someone can explain me few points about Drupal:

  1. Why there are so many-and-long-and-confusing classes and IDs?
    Example: why I need <div class="block block-user" id="block-search-0">? Why do I need such so-especific classes and IDs if I can stick to a simple line like <div class="block" id="search"> or even <div class="block search"> ?
  2. Has Drupal all this "class and ID high specificity" just to get a hyper-high grade of customization?
  3. Regarding my second question, I find that most sites doesnt need such specificity of classes and ids. If you view the source code and the CSS of most well-coded (xhtml+css) sites -that doesnt use Drupal- you can see there arent tons of classes and IDs... even in the most complex XHTML+CSS sites, a high customization can be achieved with few styles.

Bugs in the Pushbutton theme

Hi,

I hope this is the right place to submit problems with themes.

Within the Pushbutton theme I encountered 2 bugs:

1. in the gallery view the watermark arrow down from the background is OVER the thumbnails

2. when displaying tabs, sometimes the borders of the tab labels are broken. eg. when loggin in as admin and going for "benutzerkonto" (using german text)

Thanks for listening.

r.

Linking to a member-specific module page with XTemplate

Hi,

Does anyone know how I would I go about linking to a member-specific module page with the member's ID in the URL (i.e. site/module/memberID) using the XTemplate theme engine.

I spoke to someone on the drupal IRC channel who told me how to do it in PHP and adviced me to use the PHP template engine because the XHTML template engine may be discontinued in the future. Is this a wise move since I'm making this site from scratch?

Cheers

Tom

changing frontpage node theme

Hi,

I've been trying to edit the way the frontpage items get displayed.
I'm still relatively new to Drupal but have been watching the code for quite a while, and read the handbook on this site, but somehow it doesn't work...
I installed flexinode & phptemplate if that's of any relevance...

This is the code that gets produced:

Making a big change to theme_item_list?

I'd like to make quite a big change to every instance of theme_item_list, but I'm not sure how to go about doing it.

template.php patch for theming add/edit page UI

My goal is to tidy up the UI for users who are editing or creating nodes - basically make the editing pages more user friendly. I hope to submit this code to the 'useful theme snippets' section of the handbook. I think it would be of use to theme developers who are concerned about making user contributions to their site as painless as possible.

(I am using drupal 4.6.3 and modifying friendselectic theme (phptemplate) by editing the template.php and style.css files (so far). The modules involved in my set up are: Flexinode, tinyMCE, Organic Groups, Subscriptions, Filter (HTML filter) and Event.)

The problem I'm having is that I want to theme the page-layout of input boxes and their attendant help info via style.css. Each form_element block on an edit page is assigned the class 'form-item' but there is no other 'hook' that would allow for CSS to disintinguish between, say, the 'Title' element and the 'start date' element. What I'm trying to do with the following code (appended into template.php), is generate individual, html id tags for each 'form-item' wrapper. Seasoned programmers will no doubt think that it's pretty simple, in which case I'd be very greatful for your input :)

The code so far basically works on most input fields, but currently tinyMCE textareas produce some strange and unhelpful behaviour which I can't even begin to fathom! As a non-programmer it has taken me many long hours to get this far, and I'm amazed that it actually works to this extent! However, now I'm stuck. I would really appreciate any suggestions and help to get this up and running and available for all drupal themers.

The story so far ...

Pages

Subscribe with RSS Subscribe to RSS - Theme development