Alan -
You can try something like this to format it like Anton suggested:
{%
prefix = "gold";
MembershipCodeNames = prefix + "monthly;" + prefix + "annual;" + prefix + "quarterly";
if (MembershipContext.AuthenticatedUser.HasMembership(MembershipCodeNames) ) {
%}
true html/macros
{% } else { %}
false html/macros
{% } |(identity)GlobalAdministrator%}
The prefix can be set to a variable, rather than a string like:
prefix = currentdocument.parent.DocumentName