Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Adding images to web UI custom theme

I tried for Web UI Theme customization , I want to insert image into the theme but when I deployed theme on server the image not displayed but Its working on locally.
Can anyone tell me where to store image on server side.?

Here is my HTML image tag code

        img src="../img/logo.jpg" width="120" height="60"
  

1

0 votes

Comments

Let me know the location where uploaded themes are stored.

Deleting this comment


Accepted answer

Permanent link
The proper way to get the resource url is via javascript call.

jazz.util.theming.themeFileUrl("templates/ThemeWidget.html")
	

I'll update the documentation to better present that specific use case. 

My recommendation is to add a JavaScript file to the theme that has the following code : 

dojo.require("jazz.util.theming"); // This should already be included in the page, but it's safe to add it.
dojo.ready(function() {
dojo.attr("imageNodeId","src",jazz.util.theming.themeFileUrl("img/logo.jpg"));
});
Note that the url passed to that method is a path relative to the root of the theme.

Unfortunately when creating the theme, you don't currently have enough information to know where the theme is located.  In particular, several of our applications proxy theme requests back to the JTS, which may be deployed on another machine.
Ralph Schoon selected this answer as the correct answer

1 vote

Comments

 The documentation has been updated on the Wiki here

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 24
× 9
× 7

Question asked: Aug 22 '12, 1:06 a.m.

Question was seen: 5,050 times

Last updated: Aug 19 '16, 9:48 a.m.

Confirmation Cancel Confirm