PHP Connect
PHP Connect

Reputation: 549

Drupal 7 view custom templates

I have created 1 views which include the 5 types of content types nodes.

What i want to do is customize the view template.

The first 2 stories display in other format like complete title, summary and image

and last 3 stories only title.

How this possible using views.

Or i have to use $view=views_get_view_result() method

Upvotes: 0

Views: 704

Answers (1)

nmc
nmc

Reputation: 8696

You can create the first 2 stories as a regular View (either a page or a block, whichever you want to use) and create the remaining 3 stories as an attachment to the first view.

In the View, you should be able to create an attachment which you can then attach at the end of the first View.

Add Views attachment

This way, you can have slightly different configurations for each view but still have them in the same View page or block like:

ONE Block created in Views with an Attachment display

I've posted a lengthier, illustrated step-by-step on my blog at http://nmc-codes.blogspot.ca/2012/10/views-attachment-in-drupal-7.html

Upvotes: 1

Related Questions