Hey guys,
I am looking into replacing a string variable
$my_string_var = token_replace('[term:name]');
I though this would be very straight forward
I can't understand the why this isn't working since token_replace function calls the hooks. Can someone help me with this?
Best Regards,
Jorge.
Comments
Comment #1
Yorgg commentedHey guys, I did try this but both are wrong.
I have been told I had to build the term object first.
Can someone please help?
Comment #2
Yorgg commentedComment #3
dave reidYou can't use 'print' since that outputs the string and doesn't allow it to be assigned to a variable.
You are needing something like
You need a taxonomy term object/entity to provide to token_replace(). If you have that object, then I'm not sure why you need token replacement since you can just do:
Comment #4
Yorgg commentedMany Thanks,
Jorge.
Comment #5.0
(not verified) commentedthough I could be more simple with the suport request