How can I add a page break for a list view? I need a page break after each record displayed, please
385061037911 when I implemented the code it does not retain my page layout that is page 50/50 split. Is there any way to retain that in the print media?
Same here with Zap. Tried everything from targeting H1, Title, adding a page-break as a field, in the Special fields. Nothing seems to work in List View. Anyone solved? Please, please share.
You can use the following code to add a line break after each record in a list view, when printing from the browser. Replace ## with the list view #:
Note: If you have custom Javascript/CSS related to list views, this can prevent this code from working.
Knack Standard Theme
@media print {
#view_## .columns {display: block;}
#view_## .kn-list-item-container {display: block; page-break-after:always;}
}
Legacy: Classic Theme
@media print {
#view_## .kn-list-item-container {page-break-after:always;}
}
Hi,
Thanx for the help offered.
I've tried every combination I could think of - the only one that works is where I insert a page break after a view, for instance:
#view_1410 {page-break-after: always;}
Unfortunately this doesn't work when I have a list view.
Thanx Bill,
I've tried that (and various other versions) but no luck, unfortunately.
FWIW, you might be able to do this with CSS. The CSS class "kn-list-item-container" is a wrapper around each list item. You could add a CSS directive to do page breaking after each one. See https://www.w3schools.com/cssref/pr_print_pageba.asp for more details on CSS page breaks. (Note, I haven't personally tried this but I think you should explore this route..)