Node-red-dashboard logo in header

Hello,
I'm new to this topic and wanted to add a logo to the header of a dashboard. I used the template 'Node-red-dashboard logo in header' for this. The problem with this node is that every time you switch from a subpage to the page that uses the node, it adds another logo to the title. I thought that I could simply set a boolean switch to true after the first load, but unfortunately this didn't work. Does anyone have an idea how I could fix this?

Link to the template: Node-red-dashboard logo in header (flow) - Node-RED

The error is here:


        function addToToolbar() {
            var toolbar = $('.md-toolbar-tools');
            if(!toolbar.length) return;

            toolbar.append(div1);
        }
        addToToolbar();

why dont you follow the example in the documents

it clearly shows how to position the logo .. it does not add-up logos for me

This documentation is not part of the node-red-dashboard, it is part of the FlowFuse dashboard. I don't use this at all.

Rather than append which will add a new image tag to the div, try setting the html of the div

toolbar.html(div1);

Maybe you could use a template along these lines:

<div style="position: fixed; top: 2px; z-index: 2;">
    <img src="/waterloo.png" height="60" width="70"></img>
</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.