Re: [jplatform] Seeking Code Samples for Creating a Component based on a Nested Set Table

71 views
Skip to first unread message

Mark Dexter

unread,
Jul 26, 2012, 5:21:27 PM7/26/12
to joomla-de...@googlegroups.com
Do you simply want to use categories with your component items? If so,
it is exceedingly simple. All you do is add a category manager and add
a category id column to your item table. You can look at
administrator/components/com_weblinks/weblinks.xml to see how to add a
menu item for a component category manager. Good luck. Mark

On Thu, Jul 26, 2012 at 7:58 AM, Sid Childers <sid.ch...@gmail.com> wrote:
> Good Morning,
>
> I am creating a component for 2.5 that will be used to maintain a hierarchy
> of categories, topics and finally articles or posts. I need to permit
> admins to add categories, topics and posts as well as move them from one
> branch to another. Does anyone have suggestions on code samples for this
> task, specifically for the model and view classes?
>
> Thanks,
> Sid

sid.ch...@gmail.com

unread,
Jul 26, 2012, 5:40:09 PM7/26/12
to joomla-de...@googlegroups.com
I'm not sure. There are about 6 branches that will contain several nodes per branch. Each node will have several properties such as users, job posts, news articles and more. Would category manager do the trick here?

Mark Dexter

unread,
Jul 26, 2012, 5:48:30 PM7/26/12
to joomla-de...@googlegroups.com
If I understand you correctly, you are describing the items. The way
it works in Joomla is that an item (for example an article) is
assigned to exactly one category. The categories are nested any way
you like. So the category table does the work of creating the
hierarchy and nodes, and the item just gets a free ride by being
assigned to the category. I don't see why that wouldn't work in most
cases. The item table is just a simple flat table where each item
points to a node in the category table. If that works, you get this
functionality almost with zero effort. Mark
Reply all
Reply to author
Forward
0 new messages