Documentation > CMS Template API Library > Context > UIType

UIType

The type of user interface from which the current user is running the template. UIType.Unspecified is used when publishing.

Type

CrownPeak.CMSAPI.UIType

Code Example

C#

Sample:

            if (context.UIType == UIType.Classic)
            { 
              // Classic-specific code
            }
            else
            {
              // Regular code
            }
            

Connect with Crownpeak