0
votes

Using the print module and tcpdf I'm trying to fix the layout of the PDF files for a specific content type. I'm messing around in the tpl.php file and can't find a way to modify individual fields. There's just the massive $print['content'] variable that contains all of the page content. So, is there a way to access each field?

Basically I want full control over how fields (their labels, data, etc) are displayed. Currently, they are displayed like inline elements, one after the other. This looks pretty ugly.

1
thanks for the request. Please see rev. question. - WhyKiki
On the print module page it says tcpdf doesn't support css, which makes things more complicated. To break up the $content into smaller parts, you'll have to look to template_preprocess functions. Alternatively you can format individual fields with the Views module, and find another way to print the output. - lazysoundsystem
Thank you, lazysoundsystem, for the feedback. I didn't quite get the views part; care to elaborate? - WhyKiki

1 Answers

1
votes

When you edit a "View" you will notice a link that says "Theme: Information" it retrieves all suggested tpl's for the whole $output and also for each of the fields.