Server: Titles for share pages are not specific

Created on 1 Oct 2018  路  9Comments  路  Source: nextcloud/server

Screenshot of titles for share pages in browser

The titles for share pages are missing some info:

  • Shared files just show Nextcloud
  • Shared folders show Files - Nextcloud

Instead, we should show the actual names, as we also do in the header:

  • The shared file shown above should have Screenshot from 2018-01-07 00-36-09.png - Nextcloud
  • The shared folder shown above should have Screenshots - Nextcloud

It seems the title has to be passed via PHP or so, so cc @nextcloud/sharing

1. to develop bug sharing

Most helpful comment

I'll take this

All 9 comments

I'll take this

Where can I find the php-file where this has to be changed?

Correct me if I'm wrong, but the PHP-function getTitle() has to be changed and the JS-function setPageTitle has to be changed?

If so:
PHP:
https://github.com/nextcloud/server/blob/893d2daeced67bddb2a277f8d126b3b27d78fcb0/apps/theming/lib/ThemingDefaults.php#L129

has to be changed to use the filename or folder

JS:
https://github.com/nextcloud/server/blob/893d2daeced67bddb2a277f8d126b3b27d78fcb0/apps/files/js/filelist.js#L47

has to be changed to use the filename or folder instead of files/Files

has to be changed to use the filename or folder instead of files/Files

I would just change the JS side for now. This should be enough.

Okay, but how can I get the filename/folder? In the screenshot I see the string (fileId?), but how can I convert that to the filename/folder?

Okay, but how can I get the filename/folder? In the screenshot I see the string (fileId?), but how can I convert that to the filename/folder?

Good question. Maybe @skjnldsv has an idea. I thought it is in the data attributes of <html> but it isn't.

@MorrisJobke I have no idea! :(
@jancborchardt do not put good first issue on stuff that touches the js from files :grimacing: :stuck_out_tongue_winking_eye:

Moved to 16.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

blackcrack picture blackcrack  路  3Comments

williambargent picture williambargent  路  3Comments

juliushaertl picture juliushaertl  路  3Comments

mama21mama picture mama21mama  路  3Comments

ghost picture ghost  路  3Comments