Keyword

How to exclude Comments in Print pop-up

  • siamnaulak
  • siamnaulak's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 9 months ago #166014 by siamnaulak
How to exclude Comments in Print pop-up was created by siamnaulak
Hi all,

I am using Disqus comment system on K2, when I print the article (using print pop-up button) all the comments also appeared. How do I remove this comment in the print pop-up.

Screenshot: imgur.com/a/XkY4P

For example, click the link below and click Print.
prophecytoday.uk/comment/society-politics/item/920-reflections-on-the-grenfell-tower-fire.html

Regards
Siam

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 8 months ago #166046 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to exclude Comments in Print pop-up
Hello,

You can edit the item.php file, and use the following check to remove any blocks from the print view:
<?php if(JRequest::getInt('print')!=1): ?> 
// BLOCK OF CODE
<?php endif; ?>

This link will also be useful
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • siamnaulak
  • siamnaulak's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 8 months ago #166054 by siamnaulak
Replied by siamnaulak on topic How to exclude Comments in Print pop-up
Hi Krikor,

Thank you, but I am unable to find "<?php if(JRequest::getInt('print')!=1): ?>" at item.php.
Can you please be more specific and let me know which line I have to edit from item.php file.

Regards

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 8 months ago #166065 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to exclude Comments in Print pop-up
You need to enclose the blocks you want to hide in that check.
Since you are using overrides I cannot tell which lines to hide.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • siamnaulak
  • siamnaulak's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 8 months ago #166126 by siamnaulak
Replied by siamnaulak on topic How to exclude Comments in Print pop-up
Hi Krikor,

I can do it now, thanks a lot.

Siam

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 8 months ago #166137 by Krikor Boghossian
Replied by Krikor Boghossian on topic How to exclude Comments in Print pop-up
You 're welcome :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum