Just a curiosity here - why it is so hard to theme views? I love Drupal and I am seriously trying to use it, and maybe there's a better solution, but seriously, why is it we have to insert *functions* for each view? Even if I do this, I've had no luck getting it to work. When I put the code and files in place, it either does nothing, showing me the default un-themed view, or *nothing* comes up and there are comments in the HTML that a file I called doesn't exist, even though it does.

How come there's no built-in support in Views for the simple creation and use of templates like in core? Views are practically useless to me unless I can theme them. I also don't know of any other alternative than writing my own queries and php code, which sort of defeats the purpose of mastering someone else's CMS.

I'm on a large hosting provider who is not moving their stable servers to mysqli and phpi for quite some time, so I'm still on Drupal 5. So if there's a D6 solution that's easier, I can't use it yet.

If you think I'm hating on Drupal, I'm really not.

Comments

nevets’s picture

Have you read "Theming your Views"? You may not need a function per view but it depends on what you want to achieve. Views provides a nice array of theming functions, from theming all views of a particular type (list, table, node), theming a particular view and even single fields. I generally theme views by adding the appropriate function to the themes template.php file.

fuzzplugjones’s picture

Yes, I have. The thing is, it seems like a lot of code that doesn't make a whole lot of sense (it seems I have to understand the inner workings of Drupal, which if I wanted to do that I'd write my own CMS), and I can't get over *why* I have to do it.

derekwebb1’s picture

Hello,

Theming views is now a lot easier. We just released a module yesterday that allows for unprecedented customization of views. Please see the project Active Template.

Active Template is similar to ConTemplate except it is for views. Basically it allows you to theme and style each of your views to your liking and enables you to use custom PHP, CSS, and JavaScript/jQuery to customize your views. Take a look and let us know what you think.

Best regards, Derek
http://collectivecolors.com

fuzzplugjones’s picture

I'll take a look at it, anything that's easier than that stupid Theme Wizard is worth looking into.

derekwebb1’s picture

Yeah, if you don't have problems using ConTemplate, you should not have any problems using Active Template. I do hope you find it useful.

Best regards, Derek
http://collectivecolors.com

fuzzplugjones’s picture

I have never used ConTemplate but maybe I'll start!

derekwebb1’s picture

ConTemplate is extremely useful for giving your content a custom look. So I would highly recommend looking into it. I have used it on every project I have done with Drupal. I can't live without it. Basically, ConTemplate lets you configure how your nodes will look: both teasers and page displays. It is a must if you are going to use CCK too. By default CCK nodes look really bad. Of course you can make some changes with CSS but there is a limit to how much you can do with CSS alone.

Definitely have a look at ConTemplate.

Regards, Derek
http://collectivecolors.com