The following patch adds a couple of nice features. First, it allows the links generated to have explicit querystring parameters and url fragments that get passed through the l() function properly. In addition, it allows the text, path, querystring, and fragment fields to use argument substitution, just like views fields.

This means that a Link Area could point to, say, the node/add page for the content type that is currently being displayed, with the extra 'gid=1' querystring parameter for the organic group that is currently being displayed. It makes it much easier to construct links that are relevant to the information being displayed at that very moment.

I'm using it.

It is sexayyyyy.

CommentFileSizeAuthor
linkarea_tokens.patch4.96 KBeaton

Comments

twistor’s picture

I almost wrote this patch myself. Good thing I checked the queue. Patch works fine for me. The instructions for using the tokens mention field order, I'm thinking that was a copy/paste error. Indeed sexayyyyy.

Crell’s picture

I wasn't subscribed to issues for this module so I didn't get notified of this issue. OMGWTFBBQ! And it's eaton, too, which probably means the code is solid. :-) I'll try to have a look at it soon.

Crell’s picture

Status: Needs review » Fixed

Cleaned up the code comments and user-facing text a bit and committed. eaton++!

twistor’s picture

hoora!

twistor’s picture

I love this patch but what about making global tokens available all the time? Things like user, time, etc.

Crell’s picture

That would be a separate feature request. Patches welcome. :-) I think we should roll a stable sometime soon.

Status: Fixed » Closed (fixed)

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