How to make out a view in drupal

Can someone help me on how to use the topic.

For each view created, I want to have different templates.

+7
drupal drupal-views drupal-6 drupal-theming
source share
3 answers

Presentations on the topic can be somewhat complicated, depending on the type of opinions you have created and the changes that need to be made. Check this introduction for Views 2 , and be sure to install the Advanced Help module to get views2 documentation from the Views module itself (when you activate the Advanced Help module, there will be a link to the documentation for your viewing reviews and editing).

You can also find some questions / answers here on SO (e.g. Drupal 6: How to quickly view a topic? ) If you are looking a bit.

+7
source share

I actually did it the other day. I will give you a brief overview and a little later.

  • Customize your look; going to Views → Add View
  • As soon as your view is fully configured at the bottom of the view (left column in D6, the rightmost column is “Advanced” in D7), you will see a link “Subject: information”, click on it.
  • What you will be presented with is a list of template files (.tpl.php) that are used in the theme views for your data. Basically, the file names in bold are the file representations used for the data topic.

To customize your views

  • Select the desired topic. For example, if you created the “Block” view, and I wanted to set up a basic html layout, I would choose the name (different from the one currently in bold) that appears to me and create a file in my themes directory (sites / all /zen/custom-file-view-fields-views.tpl.php) - this is if the views told me that I can use the file name custom-file-view-fields-views.tpl.php
  • The next step is to know which code you need to enter. The fastest way is to return to the topic information in the submissions, click on the file link that replaces and capture the code that is presented to you. Paste this code into the generated file.
  • Now you can successfully customize this view.

Keep in mind that the information on the topic presented to you is presented from basic to complex (up to down). Therefore, choose which file you need to carefully edit. Some time later, I put some images in this answer.

Hope this helps! Hooray!

+7
source share

Is there anything specific you are trying to accomplish? There are many ways of presenting a "theme" if you do not mean the "theme" in the strict sense of Drupal.

Personally, I just give field classes and use them, rewriting the output, to include variables as classes, if necessary. This is usually simpler and more convenient than directly modifying TPL files.

0
source share

All Articles