It would be great if one could make linked content with path from tokens available in the current context.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

timbrandin’s picture

And here's a solution.

How to test:
* Create or open a page in the page manager.
* Add semantic as a style.
* Set the content to "Output this content as a link".
* And select a Token from the available tokens in the list.
* Save and test it out.

It should now render the content with a link to your token.

emattias’s picture

Status: Active » Closed (fixed)
timbrandin’s picture

Awesome! :D

ramper’s picture

Thanks, TimBrandin and emattias.

I think it would also be nice to be able to output the "Title" as a link as well, as in Views. Of course, I can get this done using "Wrapper: Raw", but if it can be done with a mouse click and entering the link address, that would be awesome.

One use case: A view pane with only a few items, with the title of the pane linking to another page with a more complete listing.

timbrandin’s picture

Sounds simple to fix. I've thought about the same actually, but haven't seen any use case until now.
Can take a look at a patch tomorrow on Innovation day here at Wk :)

// T

emattias’s picture

Ok, this functionality just changed pretty radically.

Now the "Output as link" checkbox is gone but you can select A as the HTML element for the different elements (including title). When you do that the path field is shown (works like before).

ramper’s picture

That's pretty neat, emattias (and also more "semantic", I guess :). The addition of "A" as an element should have multiple uses, I imagine. I've looked for it a few times myself.
HOWEVER, it seems like the "class" attribute is not being applied to the "Title" if it is output as an "A". Could you please check?

emattias’s picture

@ramper: Thanks for pointing that out. It should work now.

ramper’s picture

Wow, thanks very much!
I just want to add another use case (just so it might be of use to someone): When we don't want the default styling for the title of a pane (h2, h3, etc.), and instead want greater control over it, while also outputting it as a link. Even as a part-time dabbler in Drupal, I think this is a very useful module.
Thanks again, emattias (and thanks TimBrandin).

emattias’s picture

Ok, thanks to the link in a header tag use case the checkbox is back. Hopefully it will stay there.. :)