Skip to content
Snippets Groups Projects

Update README.md to account for PHPCS line length limit.

1 file
+ 11
7
Compare changes
  • Side-by-side
  • Inline
+ 11
7
## 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