We’ve consistently added new tutorials and ideas to this site. Today, we have another big block of templating examples we would like to share. There are total of 9 new tutorial entries which are all K2 templating related. We’ve listed them in order of difficulty. Check it out! (also awesome Porsche pictures included!)
We’ve consistently added new tutorials and ideas to this site. Today, we have another big block of templating examples we would like to share. There are total of 9 new tutorial entries which are all K2 templating related; some are more tips/concepts than they are code. We’ve listed them in order of implementation difficulty. If you haven’t done any templating with K2, please be sure to read the introductory tutorial first. Also, enjoy the Porsche pictures!
Beginner K2 Templating Tutorials
First, we recommend that you read the below tutorial before you get started on any of the other tutorials listed:
“Introduction to K2 Templating“
Below are our tutorials for beginner who are trying to figure out how K2 behaves:
- Tips to having greater control of your content in K2
- Understanding K2 – Knowing what values are available to you from the provided outputs
Before continuing to the intermediate section, you should read the extended introduction to K2 templating part 2 if you haven’t done so.
Intermediate K2 Templating Tutorials
This section will deal mostly with the “com_k2” folder and its contents. You should by reading the introductory tutorials listed in the beginners section know how to follow along.
- Making greater use of multiple category_item.php and other category listing templates
- Adding fun features using K2 Extrafields
- Setting up tabs with Subcategories
Below are some intermediate templating tutorials from the past:
- Using K2 Extrafields to add a rel=”canonical” to your pages
- How to inject CSS prior to the CSS4K2 plugin
Advanced K2 Templating Tutorials
Here is where we really pushed hard this time! We’ve covered some issues that have yet to be implemented even on our site or by K2 themselves!
We assume in this section that you’ve made a couple of K2 templates and know the system in and out. Also, we assume that you know PHP and Joomla itself very well.
- K2 Templates and Responsive Images
- Understanding K2 Modules
- Cheating the MVC – Using JFactory::getDBO() in the View
- Creating K2 Plugins
Some of the above may or may not be the best solutions, but are ideas we came up with to solve immediate issues at hand (responsive image hack and using getDBO to get a list of tags). We’re not particularly proud of breaking the MVC, but sometimes you gotta do what you gotta do!
Leave comments below if you have other ideas that we haven’t covered yet!