I'm a front end web developer and usually work with programmers to create the more complex aplications usually with a custom built CMS. I am taking on a freelance project and want to find a CMS that I can use to quickly get a site up and have some fairly complex functionality. I usually use Wordpress but I think we all know its not really a full CMS. The thing I like about it is the ease of skinning the templates with my own html and CSS. The thing I am discouraged about Drupal is all the Block stuff. I don't want to create the site with divs all over the place saying class="block block-block20" and all that.

I want to know if it is necessary to have these type of divs, classes and id's all over the place or are their way to keep all your divs and elements semantically named. Drupal seems a lot better then Joomla in terms of XHTML and CSS but I really want to have the power to program the page elements with the naming conventions with as little amount of extra wrapper elements and what not.

If anyone can show me where to research this a little more I would appreciate it.

Comments

nevets’s picture

Neccessary no, useful, yes, though not everyone finds them useful.

Since it is controlled by block.tpl.php and your theme can override block.tpl.php you can change the behaviour of the id and/or classes. One could use the block title (or possibly the description) with a little filtering to make it valid css. Possible drawback is both the block title and description can be changed (and the title can be blank).

It is also possible to extend the block configuration page to allow for custom id's and/or classes and then have a custom block.tpl.php use that information.

noodlenozzle’s picture

I'm fairly new to using drupal as well, however I have been following the CMS for about three years now. Here's my vantage:

Firstly, the drupal platform is EXTREMELY powerful and will probably do whatever you need and more, but (!) not without a bit of effort on your part as well. No CMS can "guess" what you want to do. You need to learn how to tell it. Using the CCK module and a bit of theming work (which is well documented in the handbook) you can leverage the power of the CMS against your ability to create well-formed and effective cascades in your stylesheets to theme the drupal site as detailed as you would like, without the need for a bunch of different .classes and #ids.

What you will need to do this is a little help from this page on how to generate body #ids and .classes for each page. The cool part about this is that using drupal's ability to alias your urls, you can create sections of your site and have drupal class your body tags based on them, as shown in the link above.

Furthermore, if you have one or two, or even a dozen special pages or content types you would like to show differently, you can do that by using this method.

By combining those two concepts with a few modules from the community you can create a pretty powerful drupal site that gives both your client and their audience quite a bit of power and flexibility in changing and contributing to the site, while making it a breeze for you to maintain the site in the future, if needed.

danshields’s picture

Thanks for such great information from both of you. It's good to know that it is possible to change things to work the way you want and I think I am definitely going to pursue using Drupal for my next project. Its really great to have such a good community that is willing to give support to others. If this were some other place I'm sure I wouldn't of received such a good response.

Thanks again to both of you and for the links.