Reputation: 69
I am quite new to Joomla, especially the K2 Framework. I would like to make a neat magazine website in Joomla. What I have done is, I have already imported all contents from Joomla! Content into K2.
What I need to do now is to arrange my categories and their articles like there are in this link or any other well arranged magazine website.
I do not know how to go about creating sub-templates and what they would look like. I have read several documents including the documentation but I don't get them so well to pave my ways
Anybody who knows what I need please help.
Upvotes: 0
Views: 320
Reputation: 815
You need to create overrides of K2 component and its module.
Copy the component files from
components/com_k2/templates
and paste it to the following path templates/{yourtemplate}/html/com_k2
. Here, you can modify all the files and their layout as per your requirement or design.
Copy the module files from modules/mod_k2_tools/default
folder and paste it the path templates/{yourtemplate}/html/mod_k2_tools
. Similarly, you can copy other modules of k2 as per your need. The other modules are as:
This way, you can create your own layout for the component and during any Joomla update it will remain as it is. Refer the following links for more details:
https://docs.joomla.org/Layout_Overrides_in_Joomla
https://getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
Hope this helps!
Upvotes: 0
Reputation: 21
Maybe you must override the k2 module. So you must make a lot of module position and use k2 content module to show different layout in same page.
You must download K2 template override package, follow this link to download: http://getk2.org/documentation/tutorials/77-k2-template-override-package-comparison
You can use k2 content module.
if you want creating sub-template for k2 content module, you must copy default folder on the /template/Your-template/html/mod_k2_content/default and you must rename the new folder.
After renaming the new folder you can check the sub-template. Add the k2 content module from your admin page and you will see select sub-template option, click it and you will see new sub-template
The sub-template name same with the name of new folder. And if you want to change style you can edit default.php in the new folder. :)
Upvotes: 1
Reputation: 21
If you want to build something similar to this website you will need to make use of modules that allow you to display K2 content.
There are far too many to mention, but K2 itself installs K2 Content and K2 Tools. Try enabling those modules and experimenting with them. They offer a lot of options to display K2 items in various ways.
Source: I've built my fair share of K2 powered Joomla sites. :)
Upvotes: 0