Skip to Content
avatar image
Former Member

Change title of Fiori App

Hello,

we have a Fiori App (which is not a Standard App extension).

We are able to Change the texts via the i18n files.

There is an index.html where there is a fixed tag <title>TITLE</title>

As we want to use several languages, this title needs to be dynamic, ideally configured also by entering a title in the i18n files.

Within standard apps, i was able to achieve this by entering folllwing code into the Component.js:

metadata: {
config: {
"titleResource": "FULLSCREEN_TITLE",
"resourceBundle": "i18n/i18n.properties"
},

FULLSCREEN_TITLE is located in the i18n file and holds the title in the specific languages.

But this way does not work for our custom app.

Currently we have this structure of Folders/files:

controller
>App.controller.js
>BaseController.js
>Detail.controller.js
>Master.controller.js
css
i18n
localService
>metadata.xml
>mockserver.js
model
view
>App.view.xml
>Detail.view.xml
>Master.view.xml
Component-preload.js
Component.js
index.html

Any ideas or hints where to Change the title?

Add comment
10|10000 characters needed characters exceeded

  • Hi there

    If you use JSON for the metadata you should be able to use a localized title for the app.

    In your manifest.json:

    {
    	"_version": "1.1.0",
    	"sap.app": {
        		"_version": "1.1.0",
        		"i18n": "i18n/i18n.properties",
        		"title": "{{appTitle}}",
        		"description": "{{appDescription}}",
        ...
    }

    (Notice the i18 tags are enclosed by double curly brackets)

    Then, in your i18n file(s):

    appTitle=My App Title
    appDescription=My App Description

    Hopefully that'll sort you out.

    More details on manifest.json here:
    https://sapui5.hana.ondemand.com/#docs/guide/be0cf40f61184b358b5faedaec98b2da.html

    Regards,
    Thomas

  • Former Member Thomas Arnesen

    Hy tom thanks for your answer.

    I tried it but it does not work

    I have the appTitle Tag in my manifest.json, and I also have the tags in my i18n files, but they do not display in the title.

    But the i18n files work because all other tags are displayed and translated correctly.

    One thing that is weird is the hard coded <title>TITLE</title> tag in the index.html. Maybe it overwrites everything we configure via the manifest.json? But the title also does not come up even if i delete the whole line "<title>TITLE</title>" or if i delete "TITLE" so that the tags are empty.

    Any other ideas?

  • Get RSS Feed

2 Answers

  • Oct 24, 2016 at 07:09 AM

    Do you run your Fiori app in FLP? Then you have to set the title of your tiles in FLP configuration , either on ABAP, HCP or portal side.

    When running apps in FLP the index.html is ignored. The FLP loads the component.js directly .

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Helmut Tammen

      Yes so the app we have problems with is a standalone app, because we can access it via a normal link to the application, which is not possible for NOT standalone applications:

      /sap/bc/ui5_ui5/sap/APPLICATION_ALIAS

      Can you explain briefly how we have to configure a standalone app so that the index.html is ignored?

      Basically we have the following configuration for all our apps:

      We use semantic objects which point to the application in the Launchpad defined via LPD_CUST. In the Launchpad we configure the apps by defining the Controler to load (SAPUI5.Component=...)

      Do you need more information?

  • avatar image
    Former Member
    Nov 04, 2016 at 07:32 AM

    Yes so the app we have problems with is a standalone app, because we can access it via a normal link to the application, which is not possible for NOT standalone applications:

    /sap/bc/ui5_ui5/sap/APPLICATION_ALIAS

    Can you explain briefly how we have to configure a standalone app so that the index.html is ignored?

    Basically we have the following configuration for all our apps:

    We use semantic objects which point to the application in the Launchpad defined via LPD_CUST. In the Launchpad we configure the apps by defining the Controler to load (SAPUI5.Component=...)

    Do you need more information?

    Add comment
    10|10000 characters needed characters exceeded