I have a custom field type that I've developed that I'm having a problem with.
If I do something like {field return="http://mysite.com/group/template/entry-url/thanks"}
everything parses fine.
I'm using structure on the site too and if I use {field return="{structure:page:url}thanks"}
that also works.
But if I try to use a global variable inside like {field return="{current_url}/thanks"}
, the replace_tag() method does not get called and I get an output like {field return="http://mysite.com/group/template/entry-url/thanks"}
Even using an embed didn't work, the code below outputs the same as the example above
embed code
{embed="group/.field" entry_id="{entry_id}" return="{current_url}/thanks"}
In field.html
{exp:channel:entries
disable="categories|pagination|member_data"
entry_id="{embed:entry_id}"
}
{field return="{embed:return}"}
{/exp:channel:entries}
I'm assuming this is some weird parse order issue, but I have no idea why it would happen. Is there a way to change when a field is parsed, or some other way to make this work?