Hola Joao, I have a custom node.tpl working fine to display all the fields of a content type, but the same code as print.node.tpl works but have some fields disappeared.
Here some missing field:
Brief description of each lesson:
foreach ((array)$field_lesson_description as $item) {
print $item['value'] }
I know almost nothing about coding so I really appreciate your help in this one.
Desde ya muchas gracias
Comments
Comment #1
jcnventuraYou can't use the .tpl that way. Try to restore the print.node.tpl and check if your lessons are displayed in the page. I haven't tested that scenario yet, so I don't really know.
If the lessons show up, you can edit the print.node.tpl to suit your preferred styling. Filling the content is the job of the original node and the module's code. The print.node.tpl contains several
<?php print $print['element'] ?>that you should re-use in your edit version (unless it's content that you don't need, in which case you can delete it).João
Comment #2
tclusellas commentedMuito oubrigado João for your prompt response and support.
If I use the default print.node.tpl everything is display, my custom node.tpl.php does display fine but some fields dissapear.
My node.tpl.php divide fields in two columns, how can I do that in a print.node.tpl
Shall I use something else instead of
print $print["content"]Thanks again
Tomás
Comment #3
jcnventuraHi,
What you want to do is complicated, and without further knowledge it's not easy to see what's the best solution.
After you activate the print module, you will no longer have access to your php code, only to it's output. That's the way the module is designed and do it otherwise would mean to create a mini-Drupal system inside Drupal.
So, what you need is to find a way to do what you want having only access to the final HTML but controlling the CSS. To split it in two columns, what I would do is to add div and class tags to each lesson items's HTML and to leave it to the CSS to move it to the left or to the right. You can specify your own CSS in the module's settings page or you can edit the print.node.tpl to add your own instead of or in addition to the one defined in
$print['css'].João
Comment #4
jcnventuraNo further info received in the last two weeks... Closing the issue.