0

We have stopped using code first jss. But we would still like to have commands like jss deploy template / jss deploy component. Unfortunately, these commands do stuff we don't want them to do, like add workflows to the templates and setting the app root/placeholders to locked.

Is it possible to modify these commands, and if it is, how could we modify them so:

  • templates are generated without workflow
  • no items are locked
  • additional templates have their placeholder settings updated

1 Answer 1

2

In order to do that you would need to modify the import process itself. The import process is using a few pipelines defined in Sitecore.JavaScriptServices.AppServices.config:

enter image description here

Each of those has plenty of processors. You would need to override some of them in order to adjust it to your needs.

  1. To get rid of the workflow from being assigned to templates you can:

    • override ProcessTemplates processor
    • for this particular change, you can also take a look at default app configuration and remove default workflow path form defaultWorkflow attribute in Sitecore.JavaScriptServices.Apps.config (would be better to override that property in your app configuration)
  2. If you would like not to protect items I would suggest looking and overriding ProtectDeveloperItems processor

  3. For placeholder settings items - take a look at AddPlaceholderAllowedControls or ProcessPlaceholders

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.