Here is a patch to:
1) Take a view name and display name at the block level (you need to ensure that they match exactly with View settings)
2) Display the view if both values have been provided otherwise show default list
3) Pass list of nodes as found by Relevant Content separated by + to the view as argument
3) Provide a theme function to change subject of the block
4) Pass block level settings and delta as arguments to both subject and content theme so that one can customize appropriately
Note:
1) You need to create the view which should take list of nodes as arguments
2) I used a block display for my purposes
On a side note, if somebody can figure out how to ensure the order of the nodes in views as same as relevant content then please share. Right now I am just sorting (descending) on post date.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | relevant_content_w_views.zip | 68.47 KB | chales |
| rel_patch.patch | 4.25 KB | chandrabhan |
Comments
Comment #1
chandrabhan commentedA small correction in my post there. You should use display ID and not display name.
Comment #2
BeaPower commentedany updates?
Comment #3
chandrabhan commentedComment #4
chandrabhan commentedComment #5
chales commentedThere are some errors in the patch related to the $settings array in a few places within the theme_relevant_content_block().
For example:
should be:
I'm working this into the dev version and will post a rerolled patch after I've completed that port.
Comment #6
chandrabhan commentedI dont think it is incorrect. Note this line that actually calls theme_relevant_content_block().
May be we should rename the variable in the input of theme_relevant_content_block() to avoid confusion.
Comment #7
chales commentedTake a look at my version which is for the 6.x-dev version. I adapted some of your code but made several changes. The argument code wasn't working for me so I changed the view invocation code to my typical variation of embedding views. There's also the addition of a Title in the Relevant Content settings form for the block as well.
I'm using it in a project currently and gradually making changes as I need them. This is a rush so I haven't tested everything, only what I need.
Here's a zip with the patch file and a CUSTOM.txt with notes. Again this is for the current 07/11 dev version.
Comment #8
CrowDog1980 commentedDid this ever go anywhere? I would love to see a feature like this in 7x. . . even support for other field types, like images, would be great. . .
Comment #9
technikh commentedsubscribing...
like to see support for Views 3.
Comment #10
fourmi4x commentedSame thing, suscribing, ideally for views 3. What is the status of this?