Documentation > CMS Template API Library > InputContext

CrownPeak.CMSAPI.InputContext : CrownPeak.CMSAPI.Context

The context available when running the input template file - input.aspx Also used in the new template file - new.aspx

NameDescriptionType
IsNew

True if this asset was just created.

Property
ShowPublishButton

Setting this value to true will show the "Publish" button. Clicking this button will publish the asset. ShowPublishButton defaults to true.

Property
ShowSaveEditButton

Setting this value to true will activate and display the "Save and Edit" button. Clicking the "Save and Edit" button saves the current changes to the database and keeps the form open so edits can continue to be made.

Property
ShowSaveNewButton

Setting this value to true will activate and display the "Save and New" button. Clicking the "Save and New" button saves the current asset and creates a new one. The newly created asset will inherit the fields from the other asset. Loads the newly created assset in Edit mode.

Property
ShowSavePreview

Setting this value to true will show the "Save & Preview" button. Clicking the "Save & Preview" button saves the current changes and renders the preview of the asset. ShowSavePreview defaults to true.

Property
UIType

The type of user interface from which the current user is running the template.

Property
ClientName

The name of this client.

Property
CultureInfo

If this is set, then when asset objects are looking for fields via the [] operator, they will first look for the the culture string (fr for example) plus name before returning, otherwise the field without the string will be returned. This will remain set for the lifetime of the currently running template unless specifically set to another culture or to null which will restore the default. The default culture has a string of "en-US"

Property
CurrentTemplateId

The asset id of the template file that we are currently running.

Property
Error

Contains errors. May also be used to trigger or set an error under some circumstances such as during upload.aspx During post_input don't use this for validation errors, use ValidationError instead.

Property
ExecutedById

The asset id of the asset that is executing this template. Only populated if the current template is called by another such as when using an Asset.Show() or Asset.GetLink() command. Calling template must also be a C# template.

Property
FilterStatus

Contains the names of statuses like "Live" and "Stage" which are considered valid in the current context. There is usually always a blank "" which signifies that assets without workflow are valid. Affects all calls which use filter status including Asset.Load(), Asset.GetFilterList(), Asset.GetFileList(), and Asset.GetFolderList() unless specifically set by those functions. This is a ReadOnlyCollection. You may read it, but not modify it. Reading this type of collection is almost identical to reading a List.

Property
JobId

The job id if the current template is running via a Job. Currently only used by post_save_job template.

Property
UIType

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

Property
UserInfo

Gets the user info. See the User class note on this one.

Property

Connect with CrownPeak