View Templates

View Module is used to create, manage and display the content list. The list which is managed by view modules are called views. The output of  view is called "display" and these displays are provided in either block or page formLets start by downloading the view module. Download View module from drupal.org and place it inside sites >> all >> module. Go to your drupal site, click on module and enable it.
Now lets create a new view with block and of content type
Navigate to structure >> Views >> Add new view
Click Continue and edit. Click on Theme:Information under advanced settings. In Row style output, choose a template file views-view--frontpage.tpl.php, if you want to change the front page view. In your theme folder create a tpl.php file with the same name and write the following line
<?php print "this is for testing"; ?>
When you rescan template files, you can see your edited template file appearing in bold. Now lets save our view. Go to blocks and place it in content section. Save block and in front page you will see "this is for testing". We can also add div to various page elements
<div class="page">
<?php print $pager;?>
</div>
We can also add CSS.

.page{
backgrond-color:#fce4ec;
}


ZenRays provide the following to make you expert

zenrays providing  drupal training in Bangalore
  1. Fully practical and project-based sessions from first class.
  2. Training by Experienced Consultants, not regular Trainers
  3. Friendly and enthusiastic faculty to clear your doubts 24X7
  4. Free Live project after the training to get you industry experience
If you want more details please visit us:

Zenrays.com Reach us at trainings@zenrays.com

Share this:

ABOUT THE AUTHOR

Ceyron Louis

Hello We are OddThemes, Our name came from the fact that we are UNIQUE. We specialize in designing premium looking fully customizable highly responsive blogger templates. We at OddThemes do carry a philosophy that: Nothing Is Impossible

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment