Created on 19 March 2024, 8 months ago
Updated 9 April 2024, 7 months ago

Forgive me if I should have missed the documentation answering my request.

When I print a page/an article, blocks are included in the printout that I wouldn't want to see there, namely navigation and footer. I cannot find a way to suppress these. Maybe, modyfing a template, adding a css file or whatever else - I don't see what I'm supposed to do.

πŸ’¬ Support request
Status

Closed: works as designed

Version

4.0

Component

Documentation

Created by

πŸ‡©πŸ‡ͺGermany thomas.wardin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @thomas.wardin
  • πŸ‡ΊπŸ‡ΈUnited States shelane

    In Drupal, controlling what content gets printed can typically be handled through CSS media queries for print or by modifying the print-specific CSS styles. Here's a general approach you can take to address this:

    Identify the Blocks: First, you'll need to identify the blocks that you don't want to appear when printing. Note down their IDs or classes.

    Create Print-Specific CSS: You can create a print-specific CSS file where you specify styles to hide the unwanted blocks when printing. You can do this by adding a print.css file in your theme's directory or by adding print-specific styles in your theme's main CSS file.

    @media print {
        .block-navigation,
        .block-footer {
            display: none;
        }
    }

    Replace .block-navigation and .block-footer with the appropriate classes or IDs of the blocks you want to hide.

    Attach the CSS File: Make sure that your print-specific CSS file is attached to the page. You can do this by modifying your theme's *.info file or by using drupal_add_css() in your theme's template.php file.

    Clear the Cache: After making these changes, it's a good idea to clear Drupal's cache to ensure that the changes take effect.

  • Status changed to Closed: works as designed 7 months ago
Production build 0.71.5 2024