Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The url and title given should be the one of the teaser, not the entire page.
I'm searching but reached a dead end when trying to adapt this for add this buttons.
Templates use a token [current-page:url] and in case of teaser I think [node:url] is more appropriate.
For instance, a views page of teasers with a small, but sufficient preview.
Change the issue if you don't think this is to be considered a bug.
thx in advance
Comments
Comment #1
TomDude48 CreditAttribution: TomDude48 commentedYou are correct, widgets in teasers should pass the info for the node they are associated with. I put a fix in which will be in the next push. You will also have to update widgets to the latest push.
The challenge here is that sharing widgets can be placed on any page on the site, not just nodes. So it is not a simple manor of switching the token to [node:url]. I created a new dynamic structure in Widgets that supports OR structures. So now I can use [|[node:url]|||[current-page:url]] which basically means use the node:url if available or use current-oage:url if not.
Let me know if it work for you. (I should make the push later today)
Comment #2
drupal a11y CreditAttribution: drupal a11y commentedAnother issue maybe is the use of the ID´s. Each ID should be different to avoid problems.
When using a CCK Token-Field with Views-Fields I get the widget for each view-row but with the same ID and wrong URL´s, the current page, instead of the node´s one.
Comment #3
Dadaisme CreditAttribution: Dadaisme commentedSame problem on the teaser whit panelizer : I added the widget to the teaser but it keeps giving the url and title of the entire page insted of the teaser. It works on the full page.
Thx.
Comment #4
yelgulwa CreditAttribution: yelgulwa commentedSubscribing.
Comment #5
CD CreditAttribution: CD commentedSubscribing, is this fixed, as I have this problem with 7.x-1.0-beta13????