- Issue created by @generalredneck
- πΊπΈUnited States generalredneck
Well tracked down the Printable links for embedded content. There's css in printable.html.twig that hides the links.
.node_view ul li{ display:none; }
ugh...
So the options as they stand for me now are:
1) Configure embeded entity view mode such that it doesn't show the "links" section (which would suck if there was links in the link section I needed, but works for me here).
2) use a preprocesssor function that strips the Printable Link out of the Links area for those very specific content types and view modes.This is going to affect π Duplicate Links with subscript reference doesn't match up with Printer-friendly URLs list at bottom of page. Active because if we put a subscript next to all links, some of the subscripts are going to appear to be missing.
- πΊπΈUnited States generalredneck
Ok so Option 1 is out above. Looks like the only way a printable link isn't printed on an entity is if that entity's template explicitly removes the links variable from being rendered.
I may need to refactor this issue to be "Printable doesn't respect the "links" field in the Manage Display section on Node entities...
Custom template or preprocessor it is!
- πΊπΈUnited States generalredneck
Anyone else looking to do what I'm doing, if you have theme hook suggestions for display modes... try something like node-printable.html.twig and put something like:
<div{{ content_attributes }}> {{ content|without('printable_navigation') }} </div>
In it. This removes the links that are currently hidden via css.
I think an appropriate patch may be to add an if statement in
printable_entity_view
that checks for$view_mode == 'printable'
, and just exclude printable_navigation entirely. I don't see that we need those links in the printer friendly version, and if we do, it should likely replace the links to existing entity as opposed to creating a hidden link. - Status changed to Fixed
10 months ago 2:47am 16 February 2024 - π¦πΊAustralia nigelcunningham Geelong
Thanks for this report.
I've just pushed a series of commits that fix this issue. As part of the fix, they add a new option to the link extractor config form that lets you choose whether to exclude the Printable links from the list. It defaults to enabled for backwards compatibility.
Automatically closed - issue fixed for 2 weeks with no activity.