Saturday, April 23, 2022

Command templates

 What are command templates?

 ØA command template (also known as a command template definition item) defines a class and method to be called during an insert operation.

ØYou can create a command template that does not display a user interface, a command template that uses a JavaScript prompt to collect an item name or a command template that displays an ASP.NET user interface.

ØCommand templates typically invoke a wizard application that collects information from a user and then programmatically creates an appropriate set of items.

Where should I define it?

ØA command template can be assigned as an insert option to items and standard values. The command template insert option appears identical to the data template and branch template insert options.

ØThe only difference is that the command template insert option triggers a Sitecore UI command. You can assign command templates along with data templates and branch templates using insert options.

Example

ØFor example, you can use a command template to invoke a wizard that gathers information from the user before creating items.

ØUnlike data templates and branch templates, which consist of predefined structures, command templates reference Sitecore UI commands to invoke wizards or other logic used to create new items.

Let's see how to create the command template Check out here

No comments:

Post a Comment

Steps to follow when using a PowerShell script to modify the goals in Sitecore

I have previously utilized PowerShell for item creation, modification, deletion, and presentation details in Sitecore.   Ø Recently, I attem...