0

I am using the print module to have print-friendly pages. I followed theme suggestions, I could not make the theming work for user pages. So far, I tried the following I would like to theme user pages for printing but I could not figure out how.

print--html--user.tpl.php
print--html--user--%.tpl.php
print--html--page--user.tpl.php 

Example pages to view theme suggestions, here and here.

1 Answer 1

0

The Print module only works for nodes. You can use the Entity Print module for Drupal 7.

You can read Entity Print / Usage to understand how to override the default template.

Overriding Templates

You can copy the entity-print.tpl.php template into your theme to take control of the global PDF template.

If you wish to have per entity type templates you can do so by implementing hook_theme() for different entity type keys, for example:

function MODULE_theme($existing, $type, $theme, $path) {
  return array(
    'entity_print__commerce_order' => array(
      'base hook' => 'entity_print',
      'template' => 'entity-print--commerce-order',
    ),
  );
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.