Yamini
Returning Observer

How to open a specific section template on Clicking on a button

Hi there,

I have a requirement of opening a specific section template form when i click on a button, how to I do it via script? or using an executable class?

I saw a method:filterAvailableTemplates in the newSectionOperation class but have difficulty in understanding how to use it in the script.

Thank you

0 Kudos
4 Replies
Peter_Jodeleit
Crownpeak employee

Just provide the desired template as parameter to the  template method.

Peter
0 Kudos

Hi Peter,

Thanks for your quick reply, but unfortunately my requirement is still not clear. Could you please send some lines of code for reference?

I am not sure for what to put in the template("combo) method

NewSectionOperation template(@NotNull

   SectionTemplate template)

because what I need to pass as parameter in the above method as I have name or uid of a section template.

0 Kudos

There are API methods where you can get the SectionTemplate by passing the uid. Please consult the API documentation.

Peter
0 Kudos
Yamini
Returning Observer

Thanks for your support Peter,

The problem has been resolved by creating a new page-content (body) and adding only one section into it and using the newly created page body in the fs-button.

0 Kudos