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.
Asked
Active
Viewed 355 times
1
-
You could do something like this: https://stackoverflow.com/questions/355313/how-do-i-hide-an-element-when-printing-a-web-page – VDWWD Jun 11 '17 at 11:07
-
I have tried adding the persona bar to my css like so (with no success): @media print { #userControls { display: none; } #ControlBar { display: none; } .personabar { display: none; } #personabar { display: none; } } – user3157885 Jun 12 '17 at 15:08
2 Answers
1
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

VDWWD
- 35,079
- 22
- 62
- 79
-
Thank you for the reply. I couldn't get this to work. I would like to know if the personaBar id or class is in any css file. I've searched for it but can't find one. – user3157885 Jun 15 '17 at 14:03
-
1
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.

user3157885
- 39
- 7
-
Thanks! This steered me in the right direction too getting the PersonaBar out of the way on a site with vertical navigation. – dgarbacz Aug 30 '17 at 15:31