Background image for portal
Hi,
Can anyone please guide me on how to add background image to portal alone and should not affect other users.
Any help will be highly appreciated.
Best Regards,
Saira
Like
Hello,
It is better to specify the image in portal main page settings instead of making background image so to prevent errors in portal functionality. To specify an image on portal main page please go to portal main page setup http://prntscr.com/q38fyx in system designer and find widget dashboard where link to the image can be placed http://prntscr.com/q38jfp. As a result this image will be displayed on the main portal page.
Best regards,
Oscar
Oscar Dylan,
Hi Oscar,
Thanks for the reply.
Actually my requirement is not to show an image in portal main page. I wanted to set background image for all portal users but don't want this image to be background image for normal crm users.
Best Regards,
Saira
It's possible to set the background image on the Main portal page via development. Please override the PortalMainPageModule for that.
The example is below:
define("UsrPortalMainPageModule", ["jQuery","PortalClientConstants", "MainHeaderSchema", "DashboardsModule",
"PortalMainPageBuilder"],
function(jQuery, PortalClientConstants) {
/**
* @class Terrasoft.configuration.PortalMainPageModule
* Portal main page module.
*/
Ext.define("Terrasoft.configuration.UsrPortalMainPageModule", {
override: "Terrasoft.PortalMainPageModule",
alternateClassName: "Terrasoft.UsrPortalMainPageModule",
init: function(){
this.callParent(arguments);
$('body').css('background-image', 'url(https://cdn1.savepice.ru/uploads/2019/12/12/67fde31a8e427d947027dbd7e6f…)');
}
});
return Terrasoft.UsrPortalMainPageModule;
});
Please note that for setting the background jQuery is used.
After that create a replacing schema for the MainHeaderSchema and add the newly created module as dependency to define():
define("MainHeaderSchema", ["UsrPortalMainPageModule"],
function() {
return {
attributes: {},
methods: {}
};
});
Here is a result: https://prnt.sc/qa2d21