What is the best way (if any) to add a rendering parameter template to a rendering using JSS? I have looked at some of the import processors, but can’t find a simple way of doing this from javascript.

up vote 8 down vote accepted

This will be supported out of the box in the general availability release of JSS (with Sitecore 9.1).

Parameters templates are automatically created for any component that declares params, for example:

export default function(manifest: Manifest) {
  manifest.addComponent({
    name: 'StyleguideComponentParams',
    params: ['cssClass', 'columns', 'useCallToAction'],
  });
}

becomes

rendering params template

  • Will you be able to set a type for each params? Like a checkbox or dropdown? – Jeppe Skovsen Oct 25 at 19:22
  • 1
    Yes. There are TypeScript typings available that describe exactly what is possible, but basically the param array can accept either strings or RenderingParameterDefinition objects, which accept the same properties as a template field definition. – Kam Figy Oct 25 at 19:31
  • I can't wait for this feature :) – Alex Shyba Nov 1 at 15:55

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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