Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Theming the views, Drupal 7

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 137
    Comment on it


    Views is the most popular module among the Drupal developer as it provides the visual query builder. views have lots of supportive module which enhance the functionality of views modules.


    Some basic works you can do by using views


    1. Can set the view page as the site front page.
    2. Display taxonomy/term view, is a sorted manner ; for example, alphabetically.
    3. Post restricted posts of certain type.
    4. Display articles the way you like.
    5. Display a block with the 10 most recent posts.
    6. List os 'unread forum posts'.
    7. Monthly archive and displays them in a block.



    You are not limited to the above mentioned points. Get into the depth of views and you will find thousands of things that you can do with views.


    When you have created the block using views you might fall in a situation where need to customize the display of view. this could be easily done with views, below are the steps you need to follow.


    1. Download a views module
    2. You will need Chaos tool suite (ctools) to work with views, so download it
    3. Install the above modules and enable Chaos tools & views & views UI modules
    4. Now create a view block by clicking structure->views->Add new view . Create a block
    5. Click on the advanced section of views
    6. Here at end of options listing, you will find `Theme:Information`
    7. Click on `Information` here view page going to show you lot of template file options. you need to pick one name from here
    8. As this the only template that view will pick to transform this view block into template
    9. For example I pick `views-view-table--client-list--page.tpl.php`
    10. Now I need to create a template with name 'views-view-table--client-list--page.tpl.php' under my template folder of active theme
    11. Customize it as you need
    12. Clear the cache
    13. Now Drupal should pick you template to display the view block content


    Thanks

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: