Showing different headerpane layout just for webportal forms

I'm wondering if it's possible to use a different header-pane layout for only 2 forms. The rest of the application should not be affected by this layout change. Tried to solve this with CSS but when i change the header-pane (different logo, color etc.) the new layout is visible through the entire application. Hopefully there's a solution.. Thanks in advance.
1 answers

You can achieve this by adding JavaScript to you html, Add the following script

<script type="text/javascript">
    (function() {
        var classes = [];

        dojo.connect(mx.ui, "startup", function() {
            dojo.addOnLoad(function() {
                var roles = mx.session.getUserRoles("Name");

                for (var i = 0, role; role = roles[i++];) {
                    var claz = "role-" + role.toLowerCase();
                    dojo.addClass(document.body, claz);

        dojo.connect(mx, "logout", function() {
            for (var i = 0, claz; claz = classes.pop();) {
                dojo.removeClass(document.body, claz);


<script type="text/javascript" src="mxclientsystem/mendix/mendix.js"></script>

in your html.

This JavaScript is to change the logo by userRole.

Change the logoPane

.role-administrator .MxClient_logoPane
    background-image: url(your image);

in your layout.css and change the background image for your different userRoles.