5

Is there a way to hide these related lists? I finally got this url (https://HOST.cs66.force.com/PORTAL_NAME/s/contentdocument/contentDocId) which shows the content document and we can preview document and download it here which is great but we don't want to show our users the Shared with, versions and other related lists. I have tried to remove these from Content Version Page layout but it still shows up here.

The second workaround I have tried is to open this url in an iframe, host the iframe in an aura component which is an aura app and change the css of related list. But since the origin of aura app is different than community origin ( Aura app -> lightning.force.com and community origin -> cs66.force.com/PORTAL_NAME), I can't even change the css of the related list.enter image description here

2
  • Please share the URL, if possible to get the right context of the issue. You have the options to hide related list on objects. Please try that as the first option. Jul 19 at 13:23
  • Yeah that's the first thing I did, tried to remove related lists from the layout but it was still coming up on communities. I tried the css fix and that resolved it.
    – AJM
    Jul 19 at 17:41

1 Answer 1

4
+50

These related lists are indeed not found as "common" related list on Content Version page layout to easily remove them via setup configuration.

Workaround: under Theme section of Experience builder, add custom css to hide the right section column containing the Shared with, Versions and other related lists:

.forceCommunityFileDetailPage .slds-size_1-of-3 {
    display: none;
}

For more details where to access the CSS editor check this documentation

Note: Use custom CSS sparingly. Future releases of template components might not support your CSS customizations

This custom CSS workaround is inspired by Chris Gardner's best answer posted for a similar question on Trailhead community Hide File Details from Customer Users in Community (Experience) Cloud

2
  • 2
    Nice. I applied the css and it works fine. Thanks for your help on this.
    – AJM
    Jul 19 at 17:37
  • @AJM Good to know this worked out for you :)
    – Shamina
    Jul 24 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.