DNN - print page without persona bar

367 Views Asked by At

I'm trying to print a page from my custom DNN module, without the persona bar, while logged in as an admin. I tried creating a custom skin but still can't prevent the persona bar menu titles from displaying on my print. I've posted this issue on the DNN community forum but never got any response.

2

There are 2 best solutions below

2
VDWWD On

The problem probably is that the Persona Bar is created within a Iframe with javascript. So if you hide the entire iframe during print it might work.

@media print {
    #personaBar-iframe {
        display: none !important;
    }
}

The Persona Bar Iframe looks like this:

<iframe id="personaBar-iframe" allowtransparency="true" scrolling="false" src="/DesktopModules/admin/Dnn.PersonaBar/index.html?cdv=59" style="width: 80px;" frameborder="0"></iframe>

The files are located in folder \DesktopModules\Admin\Dnn.PersonaBar

1
user3157885 On

This is working for me...

#personaBar-iframe{ display: none; } iframe#personaBar-iframe{ display: none; } .pb-scroll-wrapper{ display: none; } .pb-scroll-wrapper iframe#personaBar-iframe.ipad{ display: none; }

I found this in DesktopModules\Admin\Dnn.PersonaBar\css\personaBarContainer.css. Thanks VDWWD for steering me in the right direction.