I am trying to add some additional views fields through ds dynamic field but I am struggling with passing through the node id of the heartbeat target node from ds into views contexts. Is this possible???

Comments

Stalski’s picture

Is it possible to explain the use case, so I can try this out? Maybe the steps to reproduce (untill we come to this issue)

Stalski’s picture

Status: Active » Postponed (maintainer needs more info)
7wonders’s picture

Perhaps i'm going about this the wrong way but I want to expose more fields from the node being created and node being commented on through the site activity stream. The user case is a few images and taxonomy on the node that I would like to display for each node activity in heartbeat. I figured the best way is to use ds dynamic fields and pass the "Heartbeat: Node being targeted" id to the view which would then open up all the possibility of exposing any view based on the heartbeat node contexts within the activity stream.

Stalski’s picture

If you want to add more fields, you can do so with a ds field and there you have the object. That's the most easy way.
I must say, I always show other fields and I do this by templating. The more variables you expose in the template, the more fields you will be able to assign tokens too (via rules or through custom code). So it's just a matter of altering your template sentence and assign the correct fields to the message variables.

7wonders’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Hmmm, im not really a template guy yet :) Still using gui options wherever possible!

However, I actually realised that I was going about it the wrong way for my particular purpose and that using views and heartbeat seems to work a lot cleaner (allows all the relations, arguments and so on).

I will close this as works as designed because I think what I was asking for can be done the other way around from within views anyway.

Stalski’s picture

I meant "heartbeat templates". That is all managable through UI.
The system is that a logged activity is an instance of a heartbeat template. So the template only provides a sentence like "!username created !post" leaving the !variables to be replaced at runtime to have the instances.

So if your sentence is, for instance:

!username created !posts.
!summary
%images%

Then you got a couple of other variables you can replace. in this case I would suspect in the rules ui - where you selected that heartbeat template as logging action - that you have assigned the variables with the correct tokens, specific for your needs.

So I guess you are missing the fact that a heartbeat template is a structured phrase or sentence with variables that will be replaced at runtime.

And indeed, I really would suggest not to load another view just for that. It should be very flexible, maybe not well documented :(