I'm trying to ensure that the email address on the alternate context of the site uses a language specific email alias (@caerdydd. in place of @cardiff.) The code below is from the alternate context side of the paint layout.
I'm using %begin_asset_metadata_profile.email% to check if the field has been completed then lowercasing the value before replacing the domain in the email address.
The code above appears to work correctly but fails to close the profile.email check as the remainder of the paint layout fails to output meta data from this point onwards in the code.
It turns out the error was caused by code further down the page and was not the code above which was working correctly.
It is interesting to note however that it doesn't appear possible to use the %begin_asset to check if an asset has a thumbnail assigned to it. For example %begin_asset_thumbnail% doesn't work but a conditional keyword regular expression keyword does work.