plesk / plesk-ext-sdk

Toolkit for development extensions for Plesk
Apache License 2.0
11 stars 7 forks source link

Avoid route title display default #33

Closed Fleuv closed 4 years ago

Fleuv commented 4 years ago

In the extension config you can set a title for every route, however this property optional. Although when leaving out this property it somehow still shows up on the page.

Steps to repdroduce

  1. Create a new project using plesk/skeleton-ext as base.
  2. Add extension.config.js file to the root of the project.
  3. Make sure the file contains the following content:
    module.exports = {
    routes: [
        {
            path: 'Overview',
            component: 'Overview',
        }
    };
  4. Run yarn run build, package and upload the extension.

Expected result The extension's main page will show just an Alert with the server time, thus without any title.

Actual result Instead the page shows the a title with assumably a placeholder text

[Overview.title]

ekaragodin commented 4 years ago

Currently, SDK does not support pages without a title. If you don't set a title in routes config then SDK tries to get a title for a page from translations. If you want an empty title you can set the empty string for according key in translates. See the guide for details.