-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No PDF content of news reader module #48
Comments
🤷 I implemented this a long time ago and never used this feature myself or in any of our customer's projects. Feel free to create a PR with the correct link ;) |
Ok, thank you. I will take a look at how Leo does it in his extension and will come back. Thank you. ps I also never used this. A customer wants those share buttons and PDF link. |
So far I repaired it with JS // templates/j_patch-share-buttons-pdf.html5 - [email protected]
jQuery(function($) {
var pdfLinks = $('.sharebuttons .pdf'),
path = window.location.pathname.replace('/', '');
pdfLinks.each(function() {
var articleId = $(this).attr('href').split('=').pop();
$(this).attr('href', path + '?getpdf=' + articleId);
});
}); |
Fixed in 3dd4402. |
Thank you Fritz 👍 Unfortunately, the PDF generation now only works if the option is checked in the article. The customer uses the sharebutton module included in the layout, to show them page wide. We explicitly tested this with version 2.1.5. That works without checking the option in the article. With 2.1.7 it no longer works. We did not test 2.1.6. |
Yeah, this is actually deliberate. Otherwise every page could be printed with the GET parameter, even though it was not enabled. This is not intended nor desirable. I changed it so that PDF printing only works if you enabled it in the article or a share buttons content element. But I think it is feasible to expand the check to a share buttons module included in the page layout. |
Hello Fritz, grashalm |
👍 Yes, that would be great as the pdf syndication doesn't exist in the latest Contao versions. |
Hello Fritz, here is grashalm again. i am the customer of aybee. is it now possible to select the pdf button in the sharebuttons extension module to integrate the module in the layout? I don't see the pdf button there. So I can't select it to display under every page in the layout. all other 10 elements are displayed and also work. in our previous thread, aybee wrote: and you replied with: my question: could you extend the check for the sharebuttons module - integrated in the page layout? i use the latest version of your extension and contao 4.13 (as of today). it would be great if you could help me here, because i haven't been able to use the pdf function for about 2 years now... you can see it on my page https://die-schreibmaus.de Many thanks and best regards, grashalm |
Contao 4.9.9
Hallo Fritz, du benutzt die URLs zu den Artikeln z.B.
page/articles/article-alias.html?getpdf=42
um die PDFs zu generieren. Jetzt ist es aber so, dass wenn ein Newsreader im Artikel ausgegeben wird, dass der Reader dann natürlich keine News ausgeben kann und die PDF somit leer ist.Ich habe mir jetzt erstmal damit geholfen, dass ich über eine Templateänderung nicht die Links mit
.../articles/article-alias.html...
nehme, sondern sie umforme nach z.Bnews/details/news-alias.html?getpdf=42
. Dies funktioniert einwandfrei. Die Templateanpassung ist allerdings etwas aufwendig, da ich nach demautoitem
suchen muss, falls vorhanden, und auf anderen Seiten nach dempagealias
.Wieso nimmst du nicht auch direkt diese normalen Links, die Erweiterung
contao/tcpdf-bundle
von Leo nimmt die auch, und dann würde es doch funktionieren, oder habe ich da etwas nicht bedacht?The text was updated successfully, but these errors were encountered: