I'm having a problem with a custom field type where I want to return 'some value' on the condition of there being no value in data. This works when I use a tag pair, but not when I use a single tag.
i.e.
{my_field}something here{/my_field}
will call replace_tag even when $data is empty, but...
{my_field}
will not even call replace_tag unless $data is not empty. In this case I want to force a 'default' value if the field is empty but it appears impossible.
Is this a bug or intended behaviour to improve performance? Is there some workaround I can use to trick ExpressionEngine into thinking $data has some value before the template is parsed to force it to call replace_tag on single tags?
Edit:
Trawling through the ExpressionEngine core files gives me the impression that what I'm trying to achieve is impossible though I guess there's a mild chance that an extension might be able to rescue me.