Keyword

[SOLVED] Print Friendly button

  • Jesús González
  • Jesús González's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 1 month ago #117487 by Jesús González
[SOLVED] Print Friendly button was created by Jesús González
Hi!

I need to include Print Friendly service into all my K2 items, but I don't know where to paste the code. In which item.php file do I need to put it?

Thanks for your help.

Morbid Design
www.morbid-design.com

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 1 month ago #117488 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Print Friendly button

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

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

  • Jesús González
  • Jesús González's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 1 month ago #117489 by Jesús González
Replied by Jesús González on topic Re: Print Friendly button
Hi Krikor, thanks for the info.

I've read it but I still need some help:

I've created a duplicated 'default' folder, and renamed it 'recipes'. Well, I suppose that if I want to add a link with the Print Friendly code, I'll need to add that code to item.php, located in my sub-template called 'recipes'.

The first question is, how I assign this sub-template to the K2 component? Is it automatic?

The second question would be where in the code of item.php do I have to add the script and the link (I'm a beginner in php, sorry) but once I get the first question answered, I guess I'll try with the code :cheer:

Thanks for your help!

Morbid Design
www.morbid-design.com

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
11 years 1 month ago #117490 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Print Friendly button
You need to assign that template to specific K2 categories (from the category settings) or through the menu item params if you have a menu item towards multiple categories (this applies mostly to listing styles).

For the second part it's not exactly PHP more like HTML so you need to open item.php with your editor and check the comments. each part/block is properly commented so adding the code is quite easy.

PS. Remember to override only the files you need, eg. if you only need a different layout for item then your recipes folder should only contain item.php

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

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

  • Jesús González
  • Jesús González's Avatar Topic Author
  • Offline
  • Junior Member
More
11 years 1 month ago #117491 by Jesús González
Replied by Jesús González on topic Re: Print Friendly button
Thank you so much, Krikor! I got it working perfectly :)

Morbid Design
www.morbid-design.com

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


Powered by Kunena Forum