Keyword

Custom K2 template not used when additional categories added

  • Richard Marks
  • Richard Marks's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 2 months ago #85556 by Richard Marks
I am puzzled by this. If I list a single category in the parameters section of the menu item item list all is fine. But if I add additional categories, even just one, the custom template ceases to be used (even tho each category references the same custom template).

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

  • Richard Marks
  • Richard Marks's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 2 months ago #85557 by Richard Marks
I think I just figured out why the customized template isn't being used. Perhaps this isn't why, but it sounds likely.

I use the CSS4K2 plugin, or at least it's installed. When the menu link to a K2 category isn't just a single category the logic in the plugin can't determine how to load a customized stylesheet, which is computed from the category. Even if all of the categories use the same custom style, the plugin can't process multiple categories.

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

More
14 years 2 months ago #85558 by Mihail Semerdzhiev
Replied by Mihail Semerdzhiev on topic Custom K2 template not used when additional categories added
I have the same problem, any ideas? k2 2.3, don't have any 3rd party components, modules, plugins.

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

More
14 years 2 months ago #85559 by Jiliko.net
Hi everyone,

I'll check that tomorrow but i confirm that the plugin can just load one css at a time...

Olivier (css4k2 plugin author)

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

  • Richard Marks
  • Richard Marks's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 1 month ago #85560 by Richard Marks
I looked the code in your plugin over, but didn't prove to myself my hypothesis is correct. But I do know that all of the categories within the multiple have the same custom template setting, but firebug reveals only the default k2.css is being used.

If my theory is correct, one solution would be to determine the custom template for the first category of the group and load that. I'm very curious what you'll find and hope you can come up with a good solution.

Thanks for acknowledging the issue and responding.

Olivier Nolbert said:Hi everyone,
I'll check that tomorrow but i confirm that the plugin can just load one css at a time...

Olivier (css4k2 plugin author)

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

More
14 years 1 month ago #85561 by Simon Wells
Hi Richard,

Do you have your custom k2 css file placed within the folder of your k2 template, within your Joomla template?
Is the css file named correctly.
What configuration do you have set for the css4k2
Do you have the default k2 css enabled/disabled in the k2 parameters?
Try disabling the css4k2 plugin to see if your custom css is then loaded.

Lots of questions i know.

Simon
K2 Support

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

  • Richard Marks
  • Richard Marks's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 1 month ago #85562 by Richard Marks
Yes, I have followed all the guidelines, and everything is just fine & dandy until I configure multiple k2 categories for the menu item. Refreshing your memory, I have posted all the details of the custom template here: community.getk2.org/xn/detail/3536014:Topic:60630?xg_source=..., and you blessed it. Scroll down to the bottom of that thread to see the complete layout. One thing that bothers me is that with that template layout, which follows your guidelines as I understand them, the images folder appears in the templates list for categories, along with the correct custom K2 template name. That doesn't seem right.

I'm not sure what you mean by "what css4k2 configuration do I have".

If I disable the css4k2 plugin why would the template ever be referenced? That is the only way I'm aware of custom k2 templates get pulled in.

Another user also claims to be having the same issue, but I don't know his specifics.

Simon Wells (K2 Support) said:Hi Richard, Do you have your custom k2 css file placed within the folder of your k2 template, within your Joomla template? Is the css file named correctly. What configuration do you have set for the css4k2
Do you have the default k2 css enabled/disabled in the k2 parameters?
Try disabling the css4k2 plugin to see if your custom css is then loaded.

Lots of questions i know.

Simon
K2 Support

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

More
14 years 1 month ago #85563 by Jiliko.net
Forcing the first category custom template for all the items could be an option to add to the plugin...

I'll see if i can plan that this week but not sure...

Olivier

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

  • Richard Marks
  • Richard Marks's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 1 month ago #85564 by Richard Marks
Its beginning to look like this problem might have the mighty Simon stumped...

I see your rate of posting has resumed, and your busy helping support many people again. I thank you, and am grateful, as I'm sure are all here are for your efforts.

But if a newbie like me can find such an issue that has the experts stumped, what does it say about K2? I've been patiently waiting for about a month to dialog about this problem, or at least get a little feedback to help me begin to understand it. Being a newbie I recognize I might be doing something wrong, but how am I to learn otherwise? If I'm struggling don't you think others might be also?

Hear me carefully: I'm NOT saying K2 is poorly crafted or not a quality component. It provides many features sorely lacking in Joomla. But it is a complex addition, and I'm now coming to realize that Joomla is still a far cry away from a truly well integrated plug & play system. There is so much advertising and hype. This is just a comment to bring a little reality to the surface.

I guess I'm just bemoaning what is still lacking, as it reflects the significant time & effort required to create a site that has all of the UI elements & styles appear completely unified across every add in & component installed. As for the functional elements, that appears to be further along in its evolution, as represented by the various component authors providing support for Jomsocial, CB, Kuena and Agora etc.

So I guess I am slowly coming to terms with this, and realize that with each new component I decide to adopt I will probably have a non-trivial amount of integration work to do in order to be satisfied with its seamless appearance and integration with my existing site components.

Simon Wells (K2 Support) said:Hi Richard, Do you have your custom k2 css file placed within the folder of your k2 template, within your Joomla template?
Is the css file named correctly.
What configuration do you have set for the css4k2
Do you have the default k2 css enabled/disabled in the k2 parameters?
Try disabling the css4k2 plugin to see if your custom css is then loaded.

Lots of questions i know.

Simon
K2 Support

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

More
14 years 1 month ago #85565 by Jiliko.net
Hi Richard,

I've updated the plugin to load all the css files if there are many categories.

Can find it here : www.jiliko.net/en/component/k2/item/8/8

Olivier

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


Powered by Kunena Forum