Tạo Printer-friendly trong Drupal Articles

Tạo Printer-friendly trong Drupal Articles

In this tutorial we'll show you how to add a "Print This Page" button to Drupal. The main reason you'd want to do this is as a courtesy for your readers. Many still print things they read online and you don't want them to waste that expensive printer ink just to print your logo and theme as well as the article.

This is a themed tutorial because our sister newsletter with WordPress tutorials is covering the same topic this week: Creating Printer-friendly Versions of WordPress Posts.

Without this solution you'd likely need to create a separate CSS file with styles specifically for the printed page.  Fortunately the Print Module makes this much easier. It will automatically create a printer-friendly version of each page. As an added bonus and it can also do "Email to a Friend" and "Download as a PDF" link (if your server has the correct features).

Installing the Print Module to Your Drupal Site

  • Step 1: Click here to download the latest version of the "Print Module".
  • Step 2: Extract the files into a folder on your desktop. The folder will be called simply "print".
  • Step 3: Login to your site's files via FTP and navigate to /sites/all/. If there isn't a folder called /modules/ here, create one.
  • Step 4: Upload the "print" folder to /sites/all/modules/
  • Step 5: Go to Administer >> Site building >> Printer, e-mail and PDF versions. Check the box next to each of the features that you'd like to enable:

printenable

Placing Your Print Button on Your Articles

Now that module is installed we can go to Administer >> Site configuration >> Printer, e-mail and PDF versions and configure the options. By default the module places links at the bottom of the article like this:

Creating Printer-friendly Versions of Drupal Articles

  • "Content corner" will move the print option to the top-right of the article.
  • "Icon only" will use a small printer button instead of the full text: "Printer-friendly version".
  • "Use URL alias instead of node ID" will use friendly URLs rather than /node/48.
  • "Open the printer-friendly version in a new window" is a good idea as people won't have lose track of the original Drupal page.
  • "Send to printer" will send the article directly to the printer without any more clicks being needed.
Bạn thấy bài viết này như thế nào?: 
Average: 5 (1 vote)
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Sự khác biệt giữa hosting Linux và Windows

Sự khác biệt giữa hosting Linux và Windows

Trước đây, giữa hosting (dịch vụ lưu trữ) Linux và Windows luôn có một sự khác biệt rất lớn.

1,5 triệu USD là số tiền một đại gia đưa ra để đổi lấy bữa tối với chân dài

1,5 triệu USD là số tiền một đại gia đưa ra để đổi lấy bữa tối với chân dài

Ăn tối và tiếp rượu đại gia là hoạt động không bắt buộc, nhưng khó có thể chối từ với các sao nữ trong showbiz Hoa ngữ.

"Virus" Rihanna lây lan "chóng mặt" trên Facebook

Virus Rihanna lây lan chóng mặt trên Facebook

Trong những ngày gần đây, nhiều người sử dụng Facebook đã bị sập bẫy "virus" ca sĩ Rihanna thông qua các đường link chia sẻ về cô ca sĩ này trên trang cá nhân.

 

Công ty diệt chuột T&C

 

Diet con trung