Keyword

Custom menu parameters

More
10 years 9 months ago #122227 by Mik
Custom menu parameters was created by Mik
Hi Folks

I'm new to Joomla and even newer to K2. That said, I've looked for an answer to this on this site and Googled extensively, but cannot find the solution.

I am familiar with creating custom parameters in Menus in Joomla! 2.5 and have done so many times. For example, I can achieve my own category parameters by placing the params in /templates/mytemplate/html/com_content/category/mycategory.xml, and the matching mycategory.php is in the same directory.

How will I achieve a similar thing in K2? I have come to understand that the overriding mechanism is different in K2. I have my own custom category view in /templates/mytemplate/html/com_k2/mycategory/category.php. Now I need the Menu item that points to this category to have an additional setting parameter to be passed to this view.

So copying category.xml into this directory from /components/views/itemlist/tmpl doesn't appear in the settings list, and I've tried copying it to /templates/mytemplate/html/com_k2/itemlist along with the blank category.php, and again this doesn't work.

Am I missing something ovbious?

Thanks in advance

Mik

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 9 months ago #122228 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: Custom menu parameters
Hello Mik,

You need to read the documentation first.
K2 follows Joomla!'s MVC pattern for overrides.

This post will help you: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

and this as well: nuevvo.com/blog/item/84-k2-inheritance-sub-templating

Finally you should watch these videos about K2 to help you setup your categories: getk2.org/documentation/k2class2012

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum