Hide panels for portal

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ChrisSka83
    Senior Member
    • Apr 2023
    • 197

    Hide panels for portal

    Hello all.

    I am in the process of expanding the portal.

    But unfortunately I fail to hide certain panels in the portal in the entities. Or the solution is there and I just don't see it.

    If you want to write internal info about it, which the portal users should not see.

    The easiest way would be to hide the panels for the portal. Unfortunately this doesn't work, you can only hide the fields, but a part of the panel remains visible, which looks stupid.
    see screenshots. 1x with header and 1x without header

    One solution was to make the panel invisible in their settings in the EntityManager when Team = 0. But this is not a suitable and clean solution.
    And especially cumbersome if you have to go through all layouts.

    Has anyone got this solved differently and cleanly?
    Important that it works in any entity, even your own.​
    Attached Files
  • victor
    Active Community Member
    • Aug 2022
    • 727

    #2
    Specify which panels are in question and in which Layout (Detail, List (Small), Detail (Small) etc.) should these panels be hidden? For which Entity are you doing this? For KnowledgeBaseArticle there is an optimization under Portal, as shown in the screenshot.

    It is preferable to take larger screenshots, obscuring private information, so that the community has fewer clarifying questions for you (such as my post).​
    Attached Files
    Last edited by victor; 07-03-2023, 01:39 PM.

    Comment

    • ChrisSka83
      Senior Member
      • Apr 2023
      • 197

      #3
      I found these entries specifically for the portal only in the knowledge base. Other entities do not have these entries at all.

      As in their screenshot. You add a panel there now. Put a field in there where you store internal notes. But the portal users should not see this panel. I can lock the fields for portal users, but a part of the panel remains visible -> see my screenshots from above.

      It doesn't matter in which view, small or large detail view.
      The list view has no panels at all.
      Above I had written it should work in any entity.

      I just wanted to know if it is possible to hide the panels for portal users somewhere.
      With the additional detail views for the portal it is again additional work. If another panel is added, it has to be added there again.​

      Comment

      • yuri
        Member
        • Mar 2014
        • 8440

        #4
        Hi,

        If you need to hide a regular detail view panel (with fields), the right approach is to use a Layout Set for the portal. So that your portal has different detail view layout for specific entity types.

        If you need to hide some side panel, it's possible via metadata. https://docs.espocrm.com/development...fs/#sidepanels. Parameter accessDataList. It's not documented in docs, but in JSON schema: https://github.com/espocrm/espocrm/b...Defs.json#L798
        If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

        Comment

        • ChrisSka83
          Senior Member
          • Apr 2023
          • 197

          #5
          yuri so to say it briefly, it does not go about the role assignment for portal users, but only about your way.

          Comment

          • ChrisSka83
            Senior Member
            • Apr 2023
            • 197

            #6
            yuri Now I have understood the sense of layout sets. I didn't know all the time what they are for.
            I tried it for one entity and was surprised that there is no change. You have to empty the cache first.

            Now a few questions about layout sets:
            If I add or delete a field in the normal layout, will that also change in the layout set for the portal?
            Do I have to create an extra layout only for the entities where in the portal should not appear like that or do I have to create one for each entity?​

            Comment

            • rabii
              Active Community Member
              • Jun 2016
              • 1250

              #7
              From my experience working with layout set, if you deleted a field from the normal layout it should not affect the layout set.
              you can create only specific layout for certain entities in which you want the user to have a different view and the rest will be merged, e.g if you have a custom layout set for account and your user have access to both account and contact then the account layout set will display to the user the custom design from layout set and contact view ill be inherited from the normal layout.

              I would suggest to play around with the layout set and check if everything is working fine, one main thing is you have always to clear cache and rebuild to apply the changes.
              Rabii
              Web Dev

              Comment

              • victor
                Active Community Member
                • Aug 2022
                • 727

                #8
                If I add or delete a field in the normal layout, will that also change in the layout set for the portal?
                No, if the Layout (eg Detail) in which you removed the field is separately configured in your Layout Set. Screenshot 1 shows Regular visibility, and screenshot 2 shows Portal. The Website field is removed for Regular, but not for Portal.

                Do I have to create an extra layout only for the entities where in the portal should not appear like that or do I have to create one for each entity?​
                Exactly. Screenshot 3 is a Detail for Regular, and screenshot 4 shows the Layout Set applied to my Portal, which includes a Detail unique to this Layout Set. At the same time, the rest of the other entities, all their Layouts are the same as for Regular.

                You can read more about Layout Sets in our documentation: https://docs.espocrm.com/administrat...-teams-portals.
                The main thing is not to forget to make Rebuild after changes.
                Attached Files

                Comment

                Working...