Skip to Content
avatar image
Former Member

How to make a widget section width dynamic in HCP Portal

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".

pic-2.png (32.5 kB)
pic-1.png (38.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 19, 2017 at 05:13 PM

    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

    Add comment
    10|10000 characters needed characters exceeded