I would like to find out if it would be possible to get the HTML export to respect the NoPrint user macro in Confluence? We are upgrading to 5.3. I would ideally like to get this to work with the HTML export, Word export, and the Scroll PDF export. But I will be satisfied with one at a time for now.
Let me know if anyone else has had any success. Thanks.
If you have modern browsers viewing the wiki you could use a css media declaration such as this.
@media print {
.noprint { display: none; }
}
Put this into your space or global stylesheet. Then in your user macro you just put a class of noprint on the outermost container. There is also a PDF stylesheet in space admin and confluence admin where you could put ...
.noprint { display: none; }
PDFs will then do the same thing and hide those blocks.
I have added your exact text to the global stylesheet as well as the Space stylesheet, and it doesn't look like it is taking effect anywhere. I am using the most recent version of Firefox, and i can't even find the @media section in the source of the page, and it is definitely not there if i export it to HTML. Am i missing something here? Let me know. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah yeah, that wouldn't work for html export. However the PDF one should work. To get it to work for html export (assuming you use the documentation theme) go to Glbal Layouts and edit the Page Export Layout. Add the below to the html head section
<style>
.noprint {display: none;}
</style>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, that does work, i was kinda hoping for a more permanent solution that would completely remove the content from the HTML source and everything.
We are trying to use Confluence as a tool to build our documentation for users, but still allow our employees to place notes and confidential information in no-print sections that will keep the content permanently out of any printed or exported material. I can use the CSS for now, but would like a slightly better solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want something like that you will probably have to resort to an add-on to do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@lynn_jira:
Didn't Davin already answer this above? (see "To get it to work for...")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, this did kinda get lost, and you are correct. The initial question as was stated was answered, but my more advanced question has no answer currently, I will accept this as the answer and create another answer to hopefully find a solution to completely removing the noprint text from even the source of the HTML after export.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.