[solved] How to remove bottom banner on shared links (Theming)?

Hello nextcloud people,

is there a way to remove the bottom banner in my nextcloud instance? I can alter the text and link via Theming option in the nextcloud settings but it cannot remove the banner completely.
I do only see it via a publicly shared link (Shared Folder and also shared Form (additional App).

This footer comes on public shares (share-links) and consists of

  • the simple signup link that can be disabled with the config variable
     'simpleSignUpLink.shown' => false,
    
    in config.php

and

  • the part that you can manipulate yourself with the theming app.

If you want to remove the footer COMPLETELY, you must manipulate the file:

lib/public/AppFramework/Http/Template/PublicTemplateResponse.php

where you have to change the line 39:

	private $footerVisible = true;

in

	private $footerVisible = false;

You can do that with this sed command, where variable NC_DIR must be assigned to the path of your installation first:

NC_DIR="/var/www/nextcloud"

Completely remove footer:

sudo sed -i 's/private \$footerVisible = true;$/private \$footerVisible = false;/1' $NC_DIR/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php

Make footer visible (default):

sudo sed -i 's/private \$footerVisible = false;$/private \$footerVisible = true;/1' $NC_DIR/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php

You need both, to reset it to the default, when you want to run intigrety checks. After that you can switch it back.

Hope that helps,
much luck!

3 Likes

This is awesome! Perfect solution - perfectly explained! Thanks a lot :slight_smile:

1 Like

This no longer seems to work, at least on a new install of Nextcloud 27.

To fix, I installed the Custom CSS app (go to Apps and search CSS or Custom CSS), then went to Theming and adjusted the CSS rules.

Hide the footer:

footer {
    visibility: hidden;
}

Hide the Nextcloud logo:

div#header {
    display: none;
}

Hide the “Log in to YOUR_NEXTCLOUD”:

h2.login-form__headline {
    display: none;
}