Closed (won't fix)
Project:
Activity
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2009 at 02:58 UTC
Updated:
15 Jul 2009 at 15:21 UTC
Hi all,
I know I have to be missing something... but is there an equivalent of 1.x's [node-link] token in 2.x?
I just want to display the title of the node as a link in the message, which was simple enough in 1.x, but don't see anything that works in 2.x ([menu-link-title] didn't work when I tried it in 2 scenarios). I'm attempting to use it for both comment and node activity types.
[author-link] works properly for the node author part of the message.
Thanks!
Comments
Comment #1
liliplanet commentedsubscribe, thx!
Comment #2
Scott Reynolds commentedThis was brought up in this issue as well: #473946: Provide clean url tokens to node author profile. We need to do this I think, its now just a matter of figuring out which tokens to provide links for.
Comment #3
Apollo610 commentedThanks Scott.
In the issue from May that you referred to above, you mention using comment_activity_token_list() in the appropriate .inc file in order to create customized tokens for Activity.
If I wanted to essentially reuse the node URL token initialization from Activity 1.x
$data['node-link'] = l($data['node-title'], 'node/'. $data['node-id']);, what would the syntax be to do this in 2.x?I'm unsure of what other people would use as far as linked tokens are concerned, but if I were to start a list I'd want:
1) Author-Link (to profile) (included)
2) Node-Link
3) Comment-Link
Comment #4
Apollo610 commentedActually, you know what... although the URL-specific tokens would be nice, with the given set of tokens and HTML markup I'm able to do essentially what I want anyhow.
It's slightly more work, but I'd take that trade-off for the flexibility that I'm given any day.
I'll flag this as a dup, so the other thread will still be the primary discussion should you still want to go this route.
Thanks guys -
Comment #5
igorik commentedHi
I am not sure, if it is duplicate, the link from Scott is about clean url to author profile, this is about clean url to node.
Currently the only option to get url is node/xxx which is not the best solution.
Thanks
Igor
Comment #6
Apollo610 commentedIgor, to get a clean url to a node in activity you can plug something like the following into your activity format:
[author-link] just published a new blog titled "<a href="[node-url]"><strong>[title]</strong></a>"!The clean URL [node-link] would eliminate the need to do the a href statement, sure, but there are current ways around it.
There really should be a single thread for "clean URLs in activity", since they're essentially all the same thing just varying destinations. IMO leaving this open is essentially a duplicate but no harm leaving it open till things are figured out.
Comment #7
sirkitree commented