I have set up a couple of basic tokenized messages via "Activity publisher templates" (using latest dev version of tokens module). The Activity view works, and throws up the expected messages when (dummy)users add/update nodes.

However, I can't find how to make the tokens show as links.

Thanks for any pointers!

Comments

likewhoa’s picture

Which activity types are you using "Node or User"? I can confirm [link],[path] & [url] are not working with 'Node Activity" types. see #452980: unavailable tokens listed - confusing users. as it could be related to your bug if you're using 'Node Activity" type.

pisco23’s picture

Exactly. I am just using "Node" at the moment. I haven't tried USER or COMMENT yet.

sirkitree’s picture

maybe related? #452802: 'ant' instead of [title] token

There are two approaches to create tokens that are linkable - either within a module's hook_token_values() as a brand new namespace - or within the template itself you create a message formatted like:

<a href="[account-url]">[user]</a> did something to [menu-link-title].

likewhoa’s picture

sirkitree’s picture

I'm not sure what you mean by 'missing'. If the tokens are not listed in the tokens table (the collapsible fieldset) then they are not defined within the system. I'd have a better idea of how to troubleshoot this if I knew where these tokens were defined.

pisco23’s picture

I'm not sure if this is a question of "missing" or not - maybe leave that for the thread #452980: unavailable tokens listed - confusing users.

As per my original post - I see a list of tokens and can create tokenized messages as in #3 above [user] did something to [menu-link-title].

admin did something to testpage

but I can not find any way to have the [user] being the user-name linked to the user, same for the node title: it displays the node title fine, but does not link to the node itself....

sirkitree’s picture

Sorry - I should have encapsulated that in /code tags - I edited #3 - see if that works for you pisco23

mrjavum’s picture

sirkitree
<a href="[account-url]">[user]</a> did something to [menu-link-title].
The message outputs as plain text and <a> tags not turn into links...

sirkitree’s picture

Title: "link" tokens not working ? » HTML markup within the activity template
Status: Active » Fixed

Ah sorry about that - we had changed the message field handler. This commit will allow you to use HTML markup within the activity template. http://drupal.org/cvs?commit=207710

Status: Fixed » Closed (fixed)

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

pisco23’s picture

Sorry I was not following this up as i was away from drupal for a few weeks there- but many thanks - the solution in #3 with the commit in #9 works like a charm.