Dynamicweb 8 Documentation
UserTemplateExtender Class
Members  Example 

Represents template extender.
Object Model
UserTemplateExtender ClassUser Class
Syntax
'Declaration
 
Public Class UserTemplateExtender 
   Inherits Dynamicweb.Extensibility.TemplateExtender
public class UserTemplateExtender : Dynamicweb.Extensibility.TemplateExtender 
Example
public class UserTemplateExtender1 : UserTemplateExtender
{
    public override void ExtendTemplate(Dynamicweb.Rendering.Template template)
    {
        template.SetTag("MyCustomTag", "MyCustomValue:" + User.Name);
        if (IncludeParentGroups)
        {
            GroupCollection parentGroups = new GroupCollection();
            parentGroups.AddRange(User.Groups);
            //Do some actions with groups.
        }
    }
}
Inheritance Hierarchy

System.Object
   Dynamicweb.Extensibility.TemplateExtender
      Dynamicweb.Modules.UserManagement.UserTemplateExtender

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

UserTemplateExtender Members
Dynamicweb.Modules.UserManagement Namespace

Send Feedback