I have a requirement where Admin will have the ability to turn
rating feature for SPO Pages and the UI Control should be able to
display/hide based on the setting.
Steps for turning ON the Rating feature:
- Document Library Settings -> Rating Settings -> Enable
Adding the below tag to the page layout.
SharePointPortalControls:AverageRatingFieldControl id="PageRatingControl" FieldName="Rating (0-5)" runat="server" />
By doing so, I'm able to see the Rating control on the page but I'm not able to hide it even after disabling the Rating setting.
Am I doing something wrong? I'm thinking of a JSOM way of solving this.
Any suggestions are highly appreciated :)