Web UI theme customization - images upload?
8 answers
Hello Joan,
sorry for the late reply ... Here I post a sample code to replace the Rational logo with one of your enterprise:
Note that in this example, the html defines a variable in the src attribute for the image ("_imagePath"), which is filled with the themeFileUrl.
Hope this helps.
Regards,
Jorge.
sorry for the late reply ... Here I post a sample code to replace the Rational logo with one of your enterprise:
dojo.provide("jazz.theme.FooterRightWidget");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("jazz.util.theming");
(function () {
dojo.declare("jazz.theme.FooterRightWidget", [dijit._Widget, dijit._Templated], {
templatePath: jazz.util.theming.themeFileUrl("<yourlogopage>.html"),
constructor: function () {
this._imagePath = jazz.util.theming.themeFileUrl("<image>.GIF");
}
});
})();
Note that in this example, the html defines a variable in the src attribute for the image ("_imagePath"), which is filled with the themeFileUrl.
Hope this helps.
Regards,
Jorge.
Comments
Thanks, Jorge!
Appreciate your guidance, I was able to make this work. For those interested in seeing the HTML side of this:
Two points: 1. This reply format is super wonky and I'm too tired to figure it out right now, and 2. I removed the '<' from the front of each line html due to same formatting issues, pardon.
div class="custom-js-ThemeWidget"> div class="image">${_imagePath} div class="button-site" dojoAttachPoint="_buttonSite"> /div> body> img src="${_imagePath}" width="51" height="40"/> /body>
Simple for those that know... I however way overthought it.
Cheers again, Joel
Hello guys,
the code I'm trying to "footerRight.html" is quite simple:
But when loading this as theme customization, I can see the alternate text but I can't the image.
Executing this code as standalone html page works fine.
Any tip?
Regards,
Jorge.
the code I'm trying to "footerRight.html" is quite simple:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<img src="pic.GIF" alt="image"/>
</body>
</html>
But when loading this as theme customization, I can see the alternate text but I can't the image.
Executing this code as standalone html page works fine.
Any tip?
Regards,
Jorge.
Hi,
I've followed the information of this post and used the snnipet to put another image instead of the Jazz logo, but I still can't get it working...
It seems it still 'translates' the scr attribute to an invalid url:
/ccm/_theming/resource/logo.GIF which doesn't exist.
I've added the logo.gif in all the folders of my theme.zip, just in case... and My snippet ( almost copy/pasted) for FooterRightWidjet.js is:
Any idea why it resolves it that way? Any help will appreciated :)
I've followed the information of this post and used the snnipet to put another image instead of the Jazz logo, but I still can't get it working...
It seems it still 'translates' the scr attribute to an invalid url:
/ccm/_theming/resource/logo.GIF which doesn't exist.
I've added the logo.gif in all the folders of my theme.zip, just in case... and My snippet ( almost copy/pasted) for FooterRightWidjet.js is:
dojo.provide("jazz.theme.FooterRightWidget");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("jazz.util.theming");
(function() {
dojo.declare("jazz.theme.FooterRightWidget",
[dijit._Widget, dijit._Templated], {
templatePath: jazz.util.theming.themeFileUrl("templates/ThemeWidget_mod.html"),
constructor: function(args) {
this._label = "blabla";
this._imagePath = jazz.util.theming.themeFileUrl("logo.GIF");
}
});
})();
Any idea why it resolves it that way? Any help will appreciated :)
Hi,
I've followed the information of this post and used the snnipet to put another image instead of the Jazz logo, but I still can't get it working...
It seems it still 'translates' the scr attribute to an invalid url:
/ccm/_theming/resource/logo.GIF which doesn't exist.
I've added the logo.gif in all the folders of my theme.zip, just in case... and My snippet ( almost copy/pasted) for FooterRightWidjet.js is:
dojo.provide("jazz.theme.FooterRightWidget");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("jazz.util.theming");
(function() {
dojo.declare("jazz.theme.FooterRightWidget",
[dijit._Widget, dijit._Templated], {
templatePath: jazz.util.theming.themeFileUrl("templates/ThemeWidget_mod.html"),
constructor: function(args) {
this._label = "blabla";
this._imagePath = jazz.util.theming.themeFileUrl("logo.GIF");
}
});
})();
Any idea why it resolves it that way? Any help will appreciated :)
One quick clarification. Is the file actually named "logo.GIF", is it possible that it's "logo.gif"
If so our code doesn't change the case of the filename, but could you check for logo.gif to see if that works?
Second clarification would be to verify which version of the product you're using? 1.x is different than 3.x.