Closed (fixed)
Project:
Printer, email and PDF versions
Version:
6.x-1.7
Component:
Code
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 May 2009 at 23:39 UTC
Updated:
18 Jun 2009 at 23:20 UTC
I've disabled the default link locations ("Links area" and "Content container"). Instead, I enabled the Block, so I could put it in one of the custom regions of my theme.
Unfortunately, if I do this, the various versions (printer, email, PDF) all have <br /> tabs between them.
It appears that the module uses a Block hook that cannot be overridden in the theme...? Is there any way to get rid of the break tags, so that I can display the text/icons side by side?
Comments
Comment #1
jcnventuraHi,
I will try to see if I can remove the line breaks and make them happen via CSS.
In the meantime, a very simple fix to your problem would be to define your own block, inserting the same PHP code as can be found for the view operation in the print_block() function in the print.module file.
João
Comment #2
Karlheinz commentedTrue, I could do that.
What I ended up doing was opening up print.module and change line 169 from this:
$block['content'] .= $link .'<br />';..to this:
$block['content'] .= $link;Unfortunately that breaks module updates.
The links are already wrapped in
<span>tags, so I'm not even sure why the break tags are there in the first place. I would suggest getting rid of the<br />and<span>tags, and wrapping them in<div>tags instead. That way you wouldn't break anyone's existing layouts (<div>tags display as a block by default), but people could still put them inline via CSS if they wanted.That's up to you of course.
Comment #3
jcnventuraThat span is created by the generic-link generator, if I turned it into a div, the non-block links would also be changed. What I am going to do is to turn that span into a div via CSS only for the block links.
Comment #4
jcnventuraJust committed the code.. Next time you update the module you'll have to delete a line in the css/printlinks.css to keep the links in a single line or override the new style in your own CSS file.
João