On the 'display fields' tab of a content type it would be great to set different view displays for teaser and full node output for a viewfield field.

Selecting from a list of view displays would be unworkable so I propose the patch below which adds a 'linked' viewfield formatter. The 'linked' formatter uses the linked view display as set in the view's 'more link' options to render the viewfield field. Typically the selected viewfield would be a block display with the viewfield's teaser format set to 'default' and it's full node set to 'linked'.

CommentFileSizeAuthor
#1 viewfield-519060.patch3.24 KBchaps2

Comments

chaps2’s picture

Status: Active » Needs review
StatusFileSize
new3.24 KB

Here is the patch...

ak’s picture

+1 Subscribing …

sun’s picture

Status: Needs review » Needs work

I totally do not understand what this patch is doing. Needs 1) a better explanation and 2) better code comments. :)

sun’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev

We should find a solution for this in the D7 branch. The idea to re-use the 'linked' view isn't bad, but perhaps Field API in D7 provides us new options.

chaps2’s picture

@sun - I missed your comment on this last year but given that 1) you now seem to understand what the patch is doing and 2) I could very easily add some code comments is there any reason not to include it in 6.x? It's a very useful feature.

SilviuChingaru’s picture

Status: Needs work » Closed (works as designed)

You can always make a new viewfield, with another view to be displayed only in teaser or any other node display.
I don't see why change this module core when field api give us this ability already?!