COMMUNITY FORUM
[SOLVED] Print Friendly button
- Jesús González
- Topic Author
- Offline
- Junior Member
Less
More
11 years 1 month ago #117487
by Jesús González
Morbid Design
www.morbid-design.com
[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.
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
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 1 month ago #117488
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: Print Friendly button
Hello Jesus,
This tutorial will help you -> getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
This tutorial will help you -> 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.
- Jesús González
- Topic Author
- Offline
- Junior Member
11 years 1 month ago #117489
by Jesús González
Morbid Design
www.morbid-design.com
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!
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
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 1 month ago #117490
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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
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
- Topic Author
- Offline
- Junior Member
11 years 1 month ago #117491
by Jesús González
Morbid Design
www.morbid-design.com
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.