- Posts: 10
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?
Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?
- Joe Stokes
-
Topic Author
- Offline
- New Member
Less
More
14 years 11 months ago #84490
by Joe Stokes
Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item? was created by Joe Stokes
Hi everyone,I'm quite new at K2 and have a situation where I need to move the Author, Itemtoolbar and Itemrating elements to display after the article, but before the comments.I have searched through all the blogs and found no mention of this anywhere. I could also find no information in the documentation either. (I could have missed it or it is not mentioned or an option).Is there a way for me to do this? My instincts tell me that it may require some code modifications in the php module that renders the output of the item/article.Can anybody please help me or direct me to a solution?ThanxJoe
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
Less
More
- Posts: 3722
14 years 11 months ago #84491
by william white
Replied by william white on topic Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?
The best way to approach this is first to use k2 subtemplates. If you learn and use them then you wont be changing the core files at all.
This is a good starting point simon.getk2.org/k2-documents/item/91-templating
Untested When you have this done and have created a subtemplate to work with
Edit the item.php in your template and move both lines 61 to 66 and lines 85 to 188 which contain the code for displaying the author and toolbar to line 247 or so in the file.
You may have to play around with the divs and the code a bit
Try moving just one block at a time
This is a good starting point simon.getk2.org/k2-documents/item/91-templating
Untested When you have this done and have created a subtemplate to work with
Edit the item.php in your template and move both lines 61 to 66 and lines 85 to 188 which contain the code for displaying the author and toolbar to line 247 or so in the file.
You may have to play around with the divs and the code a bit
Try moving just one block at a time
Please Log in or Create an account to join the conversation.
- Joe Stokes
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 10
14 years 11 months ago #84492
by Joe Stokes
Replied by Joe Stokes on topic Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?
Hi William,
Thanks for the advice, will give it a try and give feedback.
William White said:The best way to approach this is first to use k2 subtemplates. If you learn and use them then you wont be changing the core files at all. This is a good starting point simon.getk2.org/k2-documents/item/91-templating
Untested When you have this done and have created a subtemplate to work with
Edit the item.php in your template and move both lines 61 to 66 and lines 85 to 188 which contain the code for displaying the author and toolbar to line 247 or so in the file.
You may have to play around with the divs and the code a bit
Try moving just one block at a time
Thanks for the advice, will give it a try and give feedback.
William White said:The best way to approach this is first to use k2 subtemplates. If you learn and use them then you wont be changing the core files at all. This is a good starting point simon.getk2.org/k2-documents/item/91-templating
Untested When you have this done and have created a subtemplate to work with
Edit the item.php in your template and move both lines 61 to 66 and lines 85 to 188 which contain the code for displaying the author and toolbar to line 247 or so in the file.
You may have to play around with the divs and the code a bit
Try moving just one block at a time
Please Log in or Create an account to join the conversation.
- Joe Stokes
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 10
14 years 11 months ago #84493
by Joe Stokes
Replied by Joe Stokes on topic Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?
Hi William and all in the forum,
This works like a charm. This was very valuable advice and deserves 5 stars.
I'm getting to understand the way K2 sub-templating works and now understand the way the templates are structured in the php elements. Thanks for the guidance, my problem has been solved.
By the way, I use both Google Chrome and Firefox (with firebug) to inspect the rendered output in the browser. Google has another nice feature where one can temporarily disable the css parameter to see the effect. This is done using a tick box next to each definition and it also allows one to expand the typical margin and padding elements into "top", "right", "bottom" and "left". Maybe others can also find this handy.
Thanks
Joe
Joe Stokes said:Hi William, Thanks for the advice, will give it a try and give feedback.
William White said:The best way to approach this is first to use k2 subtemplates. If you learn and use them then you wont be changing the core files at all. This is a good starting point simon.getk2.org/k2-documents/item/91-templating Untested When you have this done and have created a subtemplate to work with Edit the item.php in your template and move both lines 61 to 66 and lines 85 to 188 which contain the code for displaying the author and toolbar to line 247 or so in the file.
You may have to play around with the divs and the code a bit
Try moving just one block at a time
This works like a charm. This was very valuable advice and deserves 5 stars.
I'm getting to understand the way K2 sub-templating works and now understand the way the templates are structured in the php elements. Thanks for the guidance, my problem has been solved.
By the way, I use both Google Chrome and Firefox (with firebug) to inspect the rendered output in the browser. Google has another nice feature where one can temporarily disable the css parameter to see the effect. This is done using a tick box next to each definition and it also allows one to expand the typical margin and padding elements into "top", "right", "bottom" and "left". Maybe others can also find this handy.
Thanks
Joe
Joe Stokes said:Hi William, Thanks for the advice, will give it a try and give feedback.
William White said:The best way to approach this is first to use k2 subtemplates. If you learn and use them then you wont be changing the core files at all. This is a good starting point simon.getk2.org/k2-documents/item/91-templating Untested When you have this done and have created a subtemplate to work with Edit the item.php in your template and move both lines 61 to 66 and lines 85 to 188 which contain the code for displaying the author and toolbar to line 247 or so in the file.
You may have to play around with the divs and the code a bit
Try moving just one block at a time
Please Log in or Create an account to join the conversation.
- Simon Wells
-
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 11 months ago #84494
by Simon Wells
Replied by Simon Wells on topic Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?
Hi Joe,
Even in Firebug, you can enable/disable classes.
You can even add in new elements on the fly, so you can see you styling change before commuting it to the css file.
William offered the best advise regarding templating, the most popular guide on simon.getk2
Simon
K2 Support
Even in Firebug, you can enable/disable classes.
You can even add in new elements on the fly, so you can see you styling change before commuting it to the css file.
William offered the best advise regarding templating, the most popular guide on simon.getk2
Simon
K2 Support
Please Log in or Create an account to join the conversation.
- Joe Stokes
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 10
14 years 11 months ago #84495
by Joe Stokes
Replied by Joe Stokes on topic Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?
Hi Simon,
Oops, that shows how green I really am at this :-). I guess I will learn a lot form my Id10T errors!
Great support and feedback from this forum - as always.
Thanks a lot
Joe
Simon Wells (K2 Support) said:Hi Joe,
Even in Firebug, you can enable/disable classes.
You can even add in new elements on the fly, so you can see you styling change before commuting it to the css file.
William offered the best advise regarding templating, the most popular guide on simon.getk2
Simon
K2 Support
Oops, that shows how green I really am at this :-). I guess I will learn a lot form my Id10T errors!
Great support and feedback from this forum - as always.
Thanks a lot
Joe
Simon Wells (K2 Support) said:Hi Joe,
Even in Firebug, you can enable/disable classes.
You can even add in new elements on the fly, so you can see you styling change before commuting it to the css file.
William offered the best advise regarding templating, the most popular guide on simon.getk2
Simon
K2 Support
Please Log in or Create an account to join the conversation.
- Jeroen Duller
-
- Offline
- New Member
Less
More
- Posts: 4
10 years 11 months ago #84496
by Jeroen Duller
Replied by Jeroen Duller on topic Re: Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?
Here is the correct link getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?