I have a simplenews type where I need different auto-titles based on what term was chosen for a given vocab.

I've set the vocab weights so that the interesting one is the one which token module is picking up on.

Then I have the code:

  setlocale(LC_TIME, "nb_NO");

  $date = ucfirst(strftime("%B %Y"));

  $type = '[term-raw]';

  if ($type == "Fredagsmail") {
    $date = strftime("%d. %B %Y");
  }
  return $date;

Now - when I create a new node - I always get the node title from ucfirst(strftime("%B %Y")) - even if the term selected is Fredagsmail.

If I then edit and re-save one with Fredagsmail I then get the response from strftime("%d. %B %Y").

Seems that the [term] token stuff isn't available until after save - any way around this?

Comments

gaurav.kapoor’s picture

Issue summary: View changes
Status: Active » Closed (outdated)