cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a widget section width dynamic in HCP Portal

Shubhrajit
Explorer
0 Kudos

How can we change the width of a widget by clicking toggle button. Like below.


How to achieve this functionality? In HCP Portal service we can set the width of widget as 1/2, 1/3, 1/4, 1/6, 3/4, 2/4 of entire area. We cannot set the width as "auto".

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member199536
Active Participant
0 Kudos

Hi,

The toggle functionility can be achived with SAPUi5 controles (or HTML) embedded in the widget/application. For instance:

https://sapui5.hana.ondemand.com/sdk/explored.html#/sample/sap.tnt.sample.SideNavigation/preview

To allow a portal admin to modify the width of a widget in the site designer, you need to make use of the WidgetSettings API (this will expose the setting option for the widget and will allow you to register in your app to widget setting change events;

https://help.hana.ondemand.com/cloud_portal/frameset.htm?f0f4c7cef33645a0a6cd6764a94bf092.html

The value (of the width) that is enetered by the user (admin) can be then set to the view/app controls in the widget application.

Regards, Ido