Skip to content

seangwright/xperience-community-vscode-snippets

Repository files navigation

Xperience Community: VS Code Snippets

A collection of VS Code snippets for Xperience by Kentico, distributed as a VS Code extension

Animation of snippet being used in VS Code

Installation

Install the snippet extension through:

  • Visual Studio Marketplace
  • VS Code's Extensions tray by searching for the extension name Xperience Community VS Code Snippets
  • VS Code's Extensions tray by searching for the extension identifier SeanGWright.xperience-community-vscode-snippets

Snippets

All of the snippets below can be used using VS Code's snippet Intelliense or by replacing an entire file's contents.

All snippet generated content is populated by the file name of the file you are using the snippet in. For example, using the xpc-page-builder-widget snippet in a file named HeroWidget would generate code with C# classes named HeroWidget, HeroWidgetProperties, and HeroWidgetViewModel.

For the best results, name your files with the suffix specified in the table below.

Following the conventions

Snippet prefix Filename suffix convention Description
xpc-admin-module *AdminModule.cs Admin module to register customizations and client-side code and define new UI category
xpc-admin-template *Page.cs Admin UI Page with a custom template
xpc-admin-application *ApplicationPage.cs Admin UI Application Page to create a root UI application
xpc-admin-listing *ListingPage.cs Admin UI Listing Page to list built-in or custom data types in a table
xpc-admin-page-extender *PageExtender.cs Admin UI Page Extender to add or modify functionality of existing pages
xpc-page-builder-widget *Widget.cs Page Builder Widget with properties, view model, and registration
xpc-page-builder-section *Section.cs Page Builder Section with properties, view model, and registration
xpc-ui-form-component *FormComponent.cs Admin UI Form Component with properties, attribute, and registration
xpc-ui-form-component-client *FormComponent.tsx Admin UI Form Component - Client React component for rendering the component and managing client-side state
xpc-validation-rule *ValidationRule.cs Admin UI Form Component Validation Rule with registration, attribute, properties, and client properties
xpc-validation-rule-client *ValidationRule.tsx Admin UI Form Component Validation Rule - Client React component for rendering and client-side state
xpc-visibility-condition *VisibilityCondition.cs Admin UI Form Component Visibility Condition with registration, properties, and attribute

Contributions

If you discover a problem, please open an issue.

If you would like contribute to the code or documentation, please open a pull request.

Releases

No releases published

Packages

No packages published