Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
partial_page_print
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
partial_page_print
Merge requests
!5
Update README.md to account for PHPCS line length limit.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Update README.md to account for PHPCS line length limit.
issue/partial_page_print-3373753:3373753-phpcs-issues
into
1.0.x
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Chris Snyder
requested to merge
issue/partial_page_print-3373753:3373753-phpcs-issues
into
1.0.x
1 year ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
Closes
#3373753
0
0
Merge request reports
Compare
1.0.x
version 1
3e047d70
1 year ago
1.0.x (base)
and
latest version
latest version
3e047d70
1 commit,
1 year ago
version 1
3e047d70
1 commit,
1 year ago
1 file
+
11
−
7
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
README.md
+
11
−
7
Options
## Introduction
Introduces a button (render element) to allow visitors to print part of the current page.
The printed page would use the same theme but without any of the regions, blocks, or other parts of the page that are
not desired on the printed page.
Introduces a button (render element) to allow visitors to print part of the
current page. The printed page would use the same theme but without any of the
regions, blocks, or other parts of the page that are not desired on the printed
page.
## Requirements
@@ -12,12 +13,14 @@ This module requires no modules outside of Drupal core.
## Installation
Install with composer:
`composer require drupal/partial_page_print`
then enable the module.
Install with composer:
`composer require drupal/partial_page_print`
then enable
the module.
## Using
To add the print button to a page add the following element to the render array in your custom module or with a
preprocess hook in your theme. Be sure that the
`#element_id`
is populated with the HTML ID of the think you want to be
To add the print button to a page add the following element to the render array
in your custom module or with a preprocess hook in your theme. Be sure that
the
`#element_id`
is populated with the HTML ID of the thing you want to be
printed on the page.
```
php
@@ -29,7 +32,8 @@ printed on the page.
```
### Example
Example of adding the partial page print button to a node template in your sites theme:
Example of adding the partial page print button to a node template in your
site's theme:
**In your theme's .theme file:**
```
php
Loading