Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
One single table is formatted in a special way. So the CCS commands are not parts of a theme but inserted in the pages header dynamically by e.g. (see http://archiv.bgv-rhein-berg.de/node/2115 )
<?php
drupal_set_html_head('<style type="text/css" media="all">@import "/misc/schriftenreihe.css";</style>');
?>
or by
<?php
drupal_set_html_head('
<style type="text/css" media="all">
.sreihe { border-collapse: collapse; width: 100%;
}
.sreihe td:first-child,
.sreihe td:first-child +td,
.sreihe td:first-child +td +td +td,
.sreihe td:first-child +td +td +td +td
{ border: 1px solid black;
}
.sreihe td:first-child,
.sreihe td:first-child +td +td +td
{ padding: 0.5em;
}
.sreihe td:first-child +td,
.sreihe td:first-child +td +td +td +td
{ width: 15%;
}
.sreihe td:first-child +td +td
{ width: 2%;
}
.sreihe td
{ vertical-align: top;
}
.sreihe img
{ width: 100%;
}
</style>');
?>
These formatting commands are not recognized by the current printing module.
Is it possible to expand the modules functionality?
Regards
Schildi
Comments
Comment #1
jcnventura CreditAttribution: jcnventura commentedHum... I am myself having this problem, except that I am using node_style to insert custom css in the .
I will try to take a look at it, but it doesn't seem so easy..
Comment #2
schildi CreditAttribution: schildi commentedIf there is a better method doing this I will do a rework of the page.
Comment #3
schildi CreditAttribution: schildi commentedI changed the node to use a style defined in node_style. The table looks as before.
In FireFox the printing preview also shows the table as expected. But "printer friendly pages" doesn't show borders.
Comment #4
jcnventura CreditAttribution: jcnventura commentedI have tried to see whether I could solve this... I can't. Sorry.
The problem is that the information that gets put into head by your code or by node_style is not available to the node, which is where this module works.. I would need information from other parts of Drupal that I don't yet know how to get.
João
Comment #5
schildi CreditAttribution: schildi commentedI am free of any knowledge about drupal internals. So please don't be to strict when my ideas are nonsense.
Ok, I had a look at the tables owned by node_style. The column "variables" in "node_style_schemes" contains the style I created.
The table node_style_maps defines the relationship between style (sid) and node (nid).
I know it might not be the best idea to be dependent on a certain module, but it could be a work around until better understanding of drupal is available.
Regards
Schildi
Comment #6
jcnventura CreditAttribution: jcnventura commentedHi,
I have committed to CVS the solution to this problem.. It's not applicable to users of node_style, but anything you insert via drupal_set_html_head will be present in the head of the printer-friendly page.
The next dev build will include this.. Please test it.
João
Comment #7
schildi CreditAttribution: schildi commentedThanks
I will check this out.
Regards
Comment #8
jcnventura CreditAttribution: jcnventura commentedNo further comments received. Marking it closed.