Home Forums Presentation Screens Is it possible to hide a portlet(tab) based on an option block?

Viewing 2 reply threads
  • Author
    Posts
    • #7880
      Rafael ReisRafael Reis
      Participant

      I have a portlet that contains references to other porlets, and I was wondering based on an option block if I can hide one of the portlet. I understand that portlet are seeded into the database, but I was wondering if there is way to do that at runtime.

      0
    • #7913
      Rafael ReisRafael Reis
      Participant

      I actually found out how to do it, you can override the read in the SysWorkspaceElement and in the around event check if the optionblock is enabled or not, and manipulate the where clause, would be something like this:

      1
    • #7942
      Owen PondOwen Pond
      Participant

      Hi Rafael,

      We recommend using a before action instead of an around action. Perhaps better though would be to put your logic in the readable so that you do not have to customize the read. There is an article on using the readable  here.

      Regards

      0
      • #7952
        Rafael ReisRafael Reis
        Participant

        Thank you for the recommendations.

        0
      • #7967
        Rafael ReisRafael Reis
        Participant

        Hi Owen, so I tried to do in the readable attribute in the SysWorkspaceElement class and didn’t work in the UI, but if I do the read using scheme, works just fine. I attached two screenshots.

        0
        Attachments:
        You must be logged in to view attached files.
Viewing 2 reply threads
  • You must be logged in to reply to this topic.