Hello Community,

Can someone please let me know how can I create views for my CCK content types in template files instead of the database as common behaviour.

For example, I have created a content type test, I can create a view for the content type test by creating a file with name node-test.tpl.php But I don't know how do I create another view for same content type.

Also, is there any way Where I can assign the name of my template file to some content type.

Thanks.

Comments

Crell’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 5.x-1.6 » 5.15
Component: User interface » theme system
Status: Active » Fixed

I think you're confusing things.

The "view" tab on a node has nothing to do with the Views module. The Views module is a query builder. What you're talking about is core's template handling.

There are ways to have variable templates for nodes of the same type, but it depends on how you want to differentiate between them. Odds are, though, if you think you need that then you're probably doing something wrong to begin with. :-)

manishaneja’s picture

Thanks Crell,

for your reply.

I think you are right, I am a bit confused in this. I have been trying many things, but nothing sofar helped.
Can someone point me to some page Where I could have an information on this? or give some idea, which I could explore to get what I am looking for?

Thanks.

Crell’s picture

See this book page, and its children: http://drupal.org/node/104316

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.