Hi there,

I'd like to do some fancy theming on the Mentions view but its lacking some key fields to let me do that. Could these fields be added to the view?

Mentions: NID
Mentions: CID
Mentions: Type (node or comment)

If I could pass these fields through a custom template, I could do some nifty theming of this view.

Comments

bflora’s picture

I found a very hacky way to do this:

1. The URL in the "Link" field in the mentions view will include a # if the view item is a comment. Using this, you can theme comment rows a certain way and node rows a different way.

2. The node_load function usually takes a $nid argument, but you can also feed it an a node title to get it to load a node that you don't have a $nid for.

3. To load a comment, you have to manipulate the Link field some more to extract the comment ID so you can feed that into comment_load.

It's a hack, but it works!

deciphered’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

There is no further Drupal 6 development planed for Mentions. Sorry this issue was never resolved.

P.S., this functionality is available in the Drupal 7 version.