Keyword

Move the K2 "Author", "Itemtoolbar" and "Itemrating" elements to after the article/item?

  • Joe Stokes
  • Joe Stokes's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #84490 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.

More
14 years 3 months ago #84491 by william white
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
  • Joe Stokes's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #84492 by Joe Stokes
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.

  • Joe Stokes
  • Joe Stokes's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #84493 by Joe Stokes
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

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

More
14 years 3 months ago #84494 by Simon Wells
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.

  • Joe Stokes
  • Joe Stokes's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #84495 by Joe Stokes
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

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

More

Powered by Kunena Forum