- Posts: 6
COMMUNITY FORUM
Article with Multi-Category
- Ralden dS
-
Topic Author
- Offline
- New Member
So, ZOO Lite don't work with me. And K2 is resolving my problem. Very thanks!
Please Log in or Create an account to join the conversation.
- Oceanwatcher
-
- Offline
- Elite Member
- Posts: 175
Please Log in or Create an account to join the conversation.
- ssnobben
-
- Offline
- New Member
- Posts: 14
How about using the Subcategory patch and ArtCats from Orware does it work with K2 ? or its not needed bcs K2 does it to with unlimited subcategories and a subcategory menu (module) ?
www.orware.net/
code.orware.net/
Please Log in or Create an account to join the conversation.
- Adam Rifat
-
- Offline
- New Member
- Posts: 10
We want to be able to add items to multiple categories - and soon!
Without this feature not sure I can use this.
Please Log in or Create an account to join the conversation.
- LocaLiceR
-
- Offline
- Junior Member
Please Log in or Create an account to join the conversation.
- BDGStrategie
-
- Offline
- New Member
- Posts: 8
That would be great to have such a functionality ! But I guess this is probably hard to code... But you are the best Guys !
I'm sure you can do it :)
Please Log in or Create an account to join the conversation.
- Zuno Studios
-
- Offline
- New Member
- Posts: 1
Please Log in or Create an account to join the conversation.
- Nick
-
- Offline
- Elite Member
- Posts: 190
Please Log in or Create an account to join the conversation.
- Johann Scheving
-
- Offline
- New Member
- Posts: 12
1. allowing items to be in multiple categories. This is critical and would make this application fantastic.
2. Being able to have item in a subcategory show in parent category or not. Now if I place an item in subcategory, it show in the sub and also in the parent. Can I prevent it from showing in the parent?
Please Log in or Create an account to join the conversation.
- Vasil Enchev
-
- Offline
- New Member
- Posts: 7
ZOO have it but it is too expensive for non comercial uses and ZOO dont have Joom fish compatibility so if K2 do that
they will be the number 1 CCK
Please Log in or Create an account to join the conversation.
- Johann Scheving
-
- Offline
- New Member
- Posts: 12
Vasil Enchev said:this function is a MUST ! ZOO have it but it is too expensive for non comercial uses and ZOO dont have Joom fish compatibility so if K2 do that
they will be the number 1 CCK
Please Log in or Create an account to join the conversation.
- B_Dark
-
- Offline
- Premium Member
- Posts: 126
Please Log in or Create an account to join the conversation.
- Alistair Kent
-
- Offline
- Senior Member
- Posts: 41
Please Log in or Create an account to join the conversation.
- Joe Stokes
-
- Offline
- New Member
- Posts: 10
This would be a very nice feature in future.
However, the current database structure of K2 and Joomla does not allow for a many-to-many relationship to exist. It is inherently a restriction of MySQL and many other relational databases. (The primary key has to be unique as it is set to auto-increment and it is indexed)
So if one examines the database structure of K2, a part of it looks like this:
I have added in MySQL relationships to illustrate a part of the structure.
Now let us examine the problem area in a bit more detail:
At point A in the diagram, you will see the one-to-many relationship between the k2_categories table and the k2_items table. A simple on-to-many relationship between the primary key of k2_categories and the foreign key (catid) in k2_items.
A possible way to apply the multiple categories to multiple items relationship, is to establish a "property relationship" table as I indicated in the diagram with the K2_cat_item_prop table. It has its own unique primary key and through two independent foreign keys (fki_category_ID and fki_item_ID), it establishes an indirect many-to-many relationship through the relations identified by B an C. You can then thereafter, delete the original relationship and just ignore the foreign key in the k2_items table, if you so wish.
There is one more trick to employ, and that is to create a trigger in both the k2_categories and k2_items tables, that fire an INSERT (new record) into the K2_cat_item_prop table, every time a new record is inserted in either the k2_categories or k2_items tables. This trigger then updates the fki_category_ID with the value of the new ID (primary key) from the k2_categories table. The same will apply for the k2_items table. The key reason for employing triggers here, is to enforce the relational integrity between the three tables.
I am an absolute new boarder in php, so I would not know where to start, but I do have quite some experience with databases and SQL. So if anyone out there is willing to pick up the php side of this, I will gladly contribute where I can on the SQL side. (By the way, I have used this methodology in many instances before, and it works great and allows for some stunning other features that flow from this, but which will be outside of the scope of this topic)
With J1.6 coming soon, maybe even the Joomla team can use this methodology and I'm sure that the team at K2 will find a way to make it work.
I hope this can help
Joe Stokes
Please Log in or Create an account to join the conversation.
- HankBrown
-
- Offline
- New Member
- Posts: 9
Apparently this guy, named Jason Hart, did some work on an own MultiCat-solution for K2 already. Sure, it is only an Aplha-Version and only in combination with K2 v.2.2 but it might be a good start for a complete solution to our all problem ... don't you think so too? I am unfortunately not a professional progammer myself but maybe you guys or the people of the K2-development team can give this guy Jason Hart a hand in what he already has started ...
Here is his website with the current Alpha-Version of K2 MultiCat as download: www.developmii.com/downloads/k2-multicat.html
Please Log in or Create an account to join the conversation.
- shawn pren
-
- Offline
- New Member
- Posts: 2
It works like a charm!usjoomlapros.com/Extensions/Multi-Categories-For-Articles/flypage.tpl.html
Please Log in or Create an account to join the conversation.
- Feanor Finwe
-
- Offline
- New Member
- Posts: 15
HankBrown said:
Hello everyone ... I am currently keeping myself busy with K2 too and just as all the other here (in several threads of the forum) I am looking for multi-category publishing of a single item! However, during my research for a solution I came across a thread in people.joomla.org ... check it out: people.joomla.org/groups/viewdiscussion/112-Multiple+Categor...
Apparently this guy, named Jason Hart, did some work on an own MultiCat-solution for K2 already. Sure, it is only an Aplha-Version and only in combination with K2 v.2.2 but it might be a good start for a complete solution to our all problem ... don't you think so too? I am unfortunately not a professional progammer myself but maybe you guys or the people of the K2-development team can give this guy Jason Hart a hand in what he already has started ...
Here is his website with the current Alpha-Version of K2 MultiCat as download: www.developmii.com/downloads/k2-multicat.html
Please Log in or Create an account to join the conversation.
- Feanor Finwe
-
- Offline
- New Member
- Posts: 15
Please Log in or Create an account to join the conversation.