Code first Rendering Parameter templates

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite












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.










share|improve this question







New contributor




Jeppe Skovsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    5
    down vote

    favorite












    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.










    share|improve this question







    New contributor




    Jeppe Skovsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      5
      down vote

      favorite









      up vote
      5
      down vote

      favorite











      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.










      share|improve this question







      New contributor




      Jeppe Skovsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      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.







      jss






      share|improve this question







      New contributor




      Jeppe Skovsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Jeppe Skovsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Jeppe Skovsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 3 hours ago









      Jeppe Skovsen

      283




      283




      New contributor




      Jeppe Skovsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Jeppe Skovsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Jeppe Skovsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          4
          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






          share|improve this answer




















          • Will you be able to set a type for each params? Like a checkbox or dropdown?
            – Jeppe Skovsen
            32 mins ago










          • 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
            22 mins ago










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "664"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Jeppe Skovsen is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f14593%2fcode-first-rendering-parameter-templates%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          4
          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






          share|improve this answer




















          • Will you be able to set a type for each params? Like a checkbox or dropdown?
            – Jeppe Skovsen
            32 mins ago










          • 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
            22 mins ago














          up vote
          4
          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






          share|improve this answer




















          • Will you be able to set a type for each params? Like a checkbox or dropdown?
            – Jeppe Skovsen
            32 mins ago










          • 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
            22 mins ago












          up vote
          4
          down vote



          accepted







          up vote
          4
          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






          share|improve this answer












          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







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 37 mins ago









          Kam Figy

          2,558618




          2,558618











          • Will you be able to set a type for each params? Like a checkbox or dropdown?
            – Jeppe Skovsen
            32 mins ago










          • 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
            22 mins ago
















          • Will you be able to set a type for each params? Like a checkbox or dropdown?
            – Jeppe Skovsen
            32 mins ago










          • 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
            22 mins ago















          Will you be able to set a type for each params? Like a checkbox or dropdown?
          – Jeppe Skovsen
          32 mins ago




          Will you be able to set a type for each params? Like a checkbox or dropdown?
          – Jeppe Skovsen
          32 mins ago












          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
          22 mins ago




          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
          22 mins ago










          Jeppe Skovsen is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          Jeppe Skovsen is a new contributor. Be nice, and check out our Code of Conduct.












          Jeppe Skovsen is a new contributor. Be nice, and check out our Code of Conduct.











          Jeppe Skovsen is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f14593%2fcode-first-rendering-parameter-templates%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          Installing NextGIS Connect into QGIS 3?

          One-line joke