Timeline for using an existing token as a variable in a custom token
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 21, 2013 at 21:33 | comment | added | KMT333 | It was an issue I ran into calling a token from another module. In the module, the variable $subscriber was set within the module. The token_replace() call needed me to submit the variable of $subscriber, but I could not. I ended up adding a custom token to the module in a separate, custom tokens.inc file. It's not perfect, but it works. Thanks for your help! | |
Mar 21, 2013 at 12:57 | comment | added | avpaderno♦ | I am not sure I understand what you mean. In your code, you need to use $text as value of the token. | |
Mar 21, 2013 at 4:58 | vote | accept | KMT333 | ||
Mar 19, 2013 at 16:57 | comment | added | KMT333 | I've completed the database component and it is working with string values I type in, however, I'm struggling with the token_replace() function. The token I'm trying to replace is below -- $text = token_replace('[simplenews-subscriber:mail]'); If I return $text to the page, it is correct. However, if i try to use the value in php, it is [simplenews-subscriber:mail]. Please advise. | |
Mar 19, 2013 at 12:08 | history | answered | avpaderno♦ | CC BY-SA 3.0 |