Views > Page > View Types... how can I create a custom view type?

Bartezz - June 26, 2008 - 12:57

Hi,

I'm still trying to get used to think Drupal and am having a hard time. This time with views.

with help of a nice screencast by AwakenedVoice (http://learn.awakenedvoice.com/2007/07/30/drupal-cck-and-views-tutorial/) I've created a view. The only problem I have now is that under Page > View Types I want to be able to select something else then 'Full nodes', 'Teaser List', 'Table View', 'List View', 'Date Browser'.

In short, where can I create my own custom View Type?

Regards

AFAIK, view types cannot be

WorldFallz - June 26, 2008 - 13:54

AFAIK, view types cannot be added through the UI. There are some additional view types available as part of the http://drupal.org/project/views_bonus module. You could also look at the module to see how they are created.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Thanx for the replies! So if

Bartezz - June 26, 2008 - 22:19

Thanx for the replies!

So if they can not be added through the UI... is there a way to create them in template.php?
It would be rediculous is there wasn't a way to create custom view types without having to go into core.

Cheers

I don't think tempate.php is

WorldFallz - June 26, 2008 - 22:27

I don't think tempate.php is the place-- that's for templating functions. And you don't have to touch core-- you probably just have to make a little module to implement the views api for it-- my best suggestion is to see the views_bonus module who's sole purpose is to provide custom view types.

===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime."
-- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz

Alright thanx for that! I'll

Bartezz - June 27, 2008 - 10:18

Alright thanx for that! I'll look into that monday and see what it brings me :)

Cheers

 
 

Drupal is a registered trademark of Dries Buytaert.