1

I have create two view

[1] testimonial_image
[2] testimonial_text

Now i want to display this both view in custom created .tpl file .i.e

page--alltestimonial.tpl.php

[1] testimonial_image -> display all images of testimonial

[2] testimonial_text -> display all text description of testimonial.

How can i merge in one page?

1
  • Easiest solution would be to create 2 blocks as describes below and have them displayed on one page using context or panels.
    – deinqwertz
    Aug 9, 2013 at 14:28

3 Answers 3

3

This is the way I would approach this. I would create the two views using a block display. And place the two blocks display on the page created. Then you can create the custom page file and theme it. You can add the blocks using the default blocks page (admin/structure/block), or the context module.

In case you do not know how to create a block display, on your views UI page, enter image description here

0
0

You can use the Views attach module.

Note: This module has been deprecated for Drupal 7 in favor of its phoenix, EVA.

This module provides two additional Views display plugins, "Profile" and "Node content". These displays do not display on a page but get "attached" to either a user page or nodes of specified types. These views are not stored with the user or node, the way viewreference.module would, so they can be globally-reconfigured.

Usage tips

Many people have asked how to use this module to show content related to the node or user to which a view is attached. The answer is to use Arguments. Even though attached views have no path, they still get to make use of arguments.

  1. Create a nodereference field on some node type. Create several nodes of that type that nodereference to some other node
  2. Create a new "Node content" display; configure it as desired
  3. Add an argument for the nodereference field you created in step 1
  4. Set the default value of that argument to "Node ID from URL"
  5. Set the display to show on node types that are pointed to by that nodereference field
  6. Profit
0
0

I would consider Viewfield, which, as the name implies, essentially makes views fieldable. Attach a viewfield to a node type, allow multiple values, and you could conceivably attach as many views as you want to a node page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.