Thanks David
I looked into it and managed to get it working implementing "CMS.Base.IDataContainer" interface.
Then added my provider which will get the object.
[assembly: RegisterExtension(typeof(MemberProfileMacroFields), typeof(UserInfo))]
namespace RACGP.Kentico.Modules.Macros
{
/// <summary>
/// Summary description for MemberProfileFields
/// </summary>
public class MemberProfileMacroFields : MacroFieldContainer
{
protected override void RegisterFields()
{
base.RegisterFields();
RegisterField(new MacroField("MemberProfile", () => MemberProfileProvider.GetMemberProfileByUserName(MembershipContext.AuthenticatedUser.UserName)));
}
}
}
Bit of work, but well worth it. I couldn't find any examples in the Kentico documentation but I think lot of people would find it useful.
Peter