on 10-21-2016 11:22 AM
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?
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok now i know what you mean. I think i did not make 100% clear what is my problem.
I am aware that i can change the title of a tile within transaction /UI2/FLPD_CUST. But this has nothing to do with what i am trying to achieve: I want to change the title of an app which is shown in the TAB of the browser.
Also the index.html is not ignored, because the <title>TITLE</title> is still present
Any solutions?
Ok, I understand now. You have to add metadata like this to your Component.js.
sap.ui.define([
"sap/ui/core/UIComponent",
"sap/ui/Device",
"de/.../.../.../model/models"
], function(UIComponent, Device, models) {
"use strict";
return UIComponent.extend("de..........Component", {
metadata: {
manifest: "json",
name: "Sample Component",
library : " mycompany.abc",
includes : [
"css/style.css"
],
dependencies : {
},
config : {
"resourceBundle" : "i18n/i18n.properties",
"titleResource" : "appTitle"
}
},
resourceBundle points to the i18n file. The base directory is the folder of your Component.js
titleResource is the key in your i18n.properties file.
In your i18n.properties you have an entry for appTitle.
appTitle = My cool App
Unfortunately i have exactly this configuration:
My Component.js:
return UIComponent.extend("p78.Component", {
metadata: {
config: {
"titleResource": "FULLSCREEN_TITLE",
"resourceBundle": "i18n/i18n.properties"
},
}....
In my i18n file i have
FULLSCREEN_TITLE = Mytitle
but whenever i remove the
<title>TITLE</title> tag in the index.html file, the title is blank and nothing comes up...
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?
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.