开发者

Working with Drupal views and theming views

开发者 https://www.devze.com 2023-03-26 16:27 出处:网络
I am new to drupal views. I know how to basically use views from from end i.e creating some views. I wanted to know if i can create a view from my module and how do i theme a view that i have create

I am new to drupal views. I know how to basically use views from from end i.e creating some views.

I wanted to know if i can create a view from my module and how do i theme a view that i have created.

Is there any clear ebook or something regardi开发者_C百科ng this. I tried 1 book, But i felt it was not good explanation in it.


This is a fairly large subject. There are a lot of tutorials for Views & Panels out there.

Here's a link to the blog of the Views module author Angry Donuts, you'll find a link to the book he has written.

Have you checked drupal.org? You should find links to video tutorials and a lot of info about Views.


Is the question about theme views or programmatically create it? you can theme view by adding your own custom template for view, view field, view list, etc etc etc. Now, create view or go edit some, at Basic settings, press Theme:information, and you'll see active template for each element of the view. So, you can copy required views template from views/theme folder to your_active_theme/templates, give it proper name (as written in Information pane), and press rescan in Theme: information.

After this, you should see your template highlighted.

That's actually it.

As for programmatic way of working with views, I suggest to create view via interface, and then call in in your module, and theme as you wish. Please see this post for details.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号