I have created two node types: image, and gallery.
I have created a view that shows the newest image.
I have then used Views Attach to attach the newest image to the teaser for galleries.
When I view the teasers (on the front page or wherever), the attached view displays fine. I get the teaser, and the newest image for that gallery.
Everything works fine up to this point.

Here is where my problem lies:
I created another view that creates a page listing all the galleries. One of the fields to be displayed is teaser. However, the attached view doesn't appear in the teaser, only the text from the teaser appears. Any idea how I can get a view to display a different view that has been attached to the teaser?

Comments

Crell’s picture

Status: Active » Fixed

There's a subtle difference there. The "teaser" field in Views is not the same thing as a "teaser view" (ie, the row style plugin is Node, set to teaser). Add-on fields like views_attach do not get an opportunity to inject themselves in the former, only in the latter. Try creating a full on teaser view (Node as the row style instead of fields) and it should work. (I've done the same thing myself before.)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

werushka’s picture

sitron2’s picture

i was getting mad with this one, Crell: thanks a lot!!!

1800collect’s picture

I don't know if I'm completely following as what I've done seems to still not work. I've created a separate view and have the row style set to node. I have the settings as follows: http://imgur.com/DX2k8.png

I still get the item shown up in the teaser on the front page, but not when I create a view of the galleries. The image doesn't show up in the teaser. Could you go into more detail as I'm not getting this.

Thanks!

Crell’s picture

Status: Closed (fixed) » Fixed

Please do not post to closed support requests. More often than not they get lost. If it really is a follow up re-open the ticket, but it's better to open a new issue.

From your screen shot it looks like you're conflating two different views.

0) Make sure you have the right data model. In your case that looks like Event nodes and then Photo nodes that have a nodereference to Event nodes, which I'll call event_ref.

1) Create a PAGE view of Gallery nodes that is set to Row Style: Node, and configure it to display teasers. Put that somewhere.

2) Create a NODE CONTENT view that attaches to the "Teaser" build mode of Gallery nodes. Set it to show only Photo nodes (and also filter on published!), and give it an argument of event_ref. Configure the Node Content settings to pass in the nid. (The screenshot shows that you've done so.) Configure the rest of the view however you want (although I recommend using Fields and showing only the image field, or imagefield and title, or whatever, rather than using more teasers).

Now when you view the Page view, the Node Content view should get injected into each of the teasers in the Page view, filtered appropriately for each node.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.