4

I am new to the K2 component in Joomla, and am having a problem with the category layout grid.

I am using the K2 Content Module to pull items from a specific category. The category layout grid settings call for three columns for the leading, primary and secondary sections. Yet, the display remains in one column.

In fact, the module does not seem to respond to changes in the category layout settings at all, as images remain the same size regardless of setting.

Here are screenshots of both the category and the module page:

enter image description here K2 Content Module

I have watched several videos on the issue and searched this site, and I can't figure out what it is that I am doing wrong.

Thanks for reading!

mattmattmatt
  • 965
  • 3
  • 15
  • 29
  • If you think that my answer is correct, please, mark it as accepted, even though this is a pretty old question, or just ask for more information. – TeeJay Apr 24 '15 at 11:34
  • I haven't looked at Joomla or K2 in years (note that this question is from 2012), and cannot verify whether your answer is correct. If it is correct, and this question is useful to others, they will upvote your answer, which will have to do as a proxy for marking it correct, given that I will not be revisiting K2 anytime in the near future. – mattmattmatt Apr 24 '15 at 13:48
  • Ok, thank you for your sensible reaction. – TeeJay Apr 24 '15 at 22:34

2 Answers2

0

In case caching is enabled on website Clear the cache and see. Also check the menu item created for displaying the category.

Ajit Bohra
  • 373
  • 3
  • 9
  • This is not a caching issue. The problem is that the category settings do not apply for the module as the module has its own template and the category, too. – TeeJay Apr 15 '15 at 18:49
0

The problem is that you don't know what you are actually setting.

Category settings (number of leading, primary... articles and their layout etc., see your first screenshot) do not apply to the K2 Content Module layout at all. That's correct.

Why? Category settings apply only to pages created via Joomla Admin -> Menus. You have to create a menu of item type "K2 Category" and that will create a page where your category settings will be applied. No other page will be affected by your category settings except this one.

K2 Content Module layout can be changed only via CSS and its template that can be found in /modules/mod_k2_content/tmpl/Default/default.php on your server. In the settings of the module itself, there is no layout settings as you can see in your second screenshot.

If you want to modify the K2 Content Module layout, follow these steps:

  1. Make sure you'll override the module's template first. Just copy the whole "Default" folder including its default.php file into /templates/your_template/html/mod_k2_content/ and you'll be ready to go.
  2. Optional step for multiple module templates and layouts - You can rename the "Default" folder name to something different as "news_template". Now, in the module settings, see the "Select sub-template option" - you can choose your newly created one.
  3. In the default.php file, change the HTML as your layout requires.
  4. Change or write your own CSS for the module. You can do it either via k2.css file or your custom template stylesheet.

There is no "click-way" to choose the layout of the K2 Content Module, sorry - this is the only way.

// Update

I didn't notice that this is so old question but it hasn't been answered properly - so finally, this is the answer. The problem is still current, K2 is still widely used and this applies for all Joomla versions from 1.5 to 3.x

TeeJay
  • 1,593
  • 3
  • 21
  • 33