Token integration was added in the (now) v2 branch but as that code branch is a bit of a clusterfsck I don't want to continue it. Instead, I'd like to cleanly re-implement token integration in the v1 branch.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

AlfTheCat’s picture

Hi Damien,

Are tokens already usable in the new (and awesome) 1.13 version?

All the best!

DamienMcKenna’s picture

@AlfTheCat: no, there's no Token support in the new release, unless you do so yourself via the hooks. Hopefully for the next release.

bjalford’s picture

Will this include Open Graph token support?

DamienMcKenna’s picture

@bjalford: It'll be possible to use tokens in Open Graph tags, is that what you mean?

bjalford’s picture

yes - thanks

DamienMcKenna’s picture

I've added the following note to the README.txt and project page:

  • Nodewords currently does not support tokens, that functionality was lost when the 6.x-1.12-x codebase was reverted. Adding Token support is planned for a future release: http://drupal.org/node/1380362
DamienMcKenna’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Decided to bump this to the v2 branch, which will be rebuilt from the current v1 codebase.

com_net’s picture

I think the use of tokens was the only meaning of this module. How can I go back to version 1.11?
With 1.13 all my pages became completely stupid to look in the search results.

DamienMcKenna’s picture

You would have to go back to one of the v1.12 betas, but they had problems too.

notluap’s picture

Any update about token integration? In my opinion, not having tokens working makes this module almost counter productive as Google will punish your site for having identical meta descriptions on every page.

DamienMcKenna’s picture

Status: Active » Postponed

Marking all v2 issues as postponed while v1 is finished off.

hanoii’s picture

I haven't surfed the code yet, but I would ask to reconsider adding token to v1. It shouldn't really be any hard to implement, it's just properly adding a couple of token replace functions before outputting the tags, or am I missing something? I am willing to try to submit a patch if this might be considered.

DamienMcKenna’s picture

@hanoii: I'll happily review a patch. My concern with tokens is that when you check empty($tag['value']) it will find the token string, not its output, so the current logic of using defaults if the overrides are empty will require more processing.

hanoii’s picture

this would only happen if the override has a token that expands to an empty string?

You could always check for empty after the replacement of tokens have happened.

Dries Arnolds’s picture

hanoii, are you still working on a patch? I'll gladly review it.

chadmkidner’s picture

Version: 6.x-2.x-dev » 6.x-1.14-beta2

Hello, after a long time of putting off "upgrading" from the 1.2 (or 2.x) release as it was working great for me, I finally did so yesterday (mostly due to the annoying error always notifying me that my release was no longer supported).

I have to comment though, I was disappointed to find that token support was removed from the module. I have to agree with what others have already mentioned, this was certainly one of the primary components to having this module to begin with. If I wanted the same default meta info on every page I would simply hard code it, however as also previously mentioned, search engine penalize for having it as such.

I think that if this is going to be a feature request that it needs to be so under the 1.4 branch as this seems to be the current version in development. and as the 1.2 or rather 2.x version already has token support... I would personally say that this is a pretty vital feature for this module and hope @maintainers find it to be as well and choose to change this to active again soon.

If attention gets put into this re-implementation soon I would definitely be on board to help and test it for bugs. Thanks for all the work put into this module!

marcoBauli’s picture

yet another +1 for reimplementing token support, and very willing to contribute with bounty and testing.

ps: if token is nasty and requires lots of work, at least would be useful to be able to use the default 'page title' together with 'site name divider' text. This and custom pages meta tags paths can handle quite a few combinations.

hanoii’s picture

I believe page title and site name is the standard default

marcoBauli’s picture

@hanoii: the problem is that 'site name divider' works only if you first specify a 'page title', so this makes custom pages paths almost unusable.

As it is now, if you specify:

PATH: countries/*
PAGE TITLE:
SITE NAME DIVIDER: holidays and vacations |

does not "take" and nothing happens on your countries/* pages. To make it work you need to specify 'page title' also, for example:

PATH: countries/*
PAGE TITLE: Foo
SITE NAME DIVIDER: holidays and vacations |

but this outputs "Foo holidays and vacations | Sitename" on all countries/* pages, which is no good both for usability and SEO.

Unless i am missing something...

mrP’s picture

Status: Needs review » Needs work
FileSize
9.95 KB

The patch adds token support to nodewords_basic for description, abstract, keywords, and copyright only. The available tokens are quite limited (ie, no taxonomy, vocabulary, body, or teaser tokens) though adding the others present in the old 2.x version should be pretty straighforward.

Its probably junk, but at least its a start.

mrP’s picture

Priority: Normal » Major
Status: Postponed » Needs review
FileSize
9.95 KB

...testbot please (but still needs work *obviously*)

DamienMcKenna’s picture

Version: 6.x-1.14-beta2 » 6.x-1.x-dev

Changing the status so it doesn't get overlooked.

aiphes’s picture

patch work on 1.14 version...but missing token like node-teaser..

Summit’s picture

Also missing token arg[0], arg[1] etc for arguments of the url tokens. These are very important to me

@aiphes can you winzip your version including tokens, I am not able to get it to work..sorry.

greetings, Martijn

aiphes’s picture

here it is

Summit’s picture

Hi, Aiphes,

Did you add url tokens like arg[0] etc...or are you willing to?

greetings, Martijn

aiphes’s picture

i did just apply the patch #21

kinaia’s picture

why token isn't added in function nodewords_basic_title_prepare ?

JCB’s picture

I can confirm that I just applied patch #21 to the latest dev version, and I now have token support, which meets my requirements.

slybud’s picture

Hello,

Is the integration of this feature/patch in the roadmap of nodewords ?
Is there any plans to extend this feature/patch to submodules like OPen Graph ?

DamienMcKenna’s picture

This won't be added to v1, but it will be added to v3: #2274037: Plan for Nodewords v6.x-3.0 release

Summit’s picture

Super! Looking forward to the 6.x-3 release with tokens like arg[0] etc..working again!
Greetings, Martijn

DamienMcKenna’s picture

DamienMcKenna’s picture

DamienMcKenna’s picture

Status: Needs work » Closed (won't fix)

Thank you for taking the time to work on this. However, the module is no longer supported, so I'm closing this issue.