How to add categories to my admin view #153
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#153
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I couldn't find a video that explained this from beginning to end. I found this one and followed the instructions and the categories but my category field doesn't work.
https://www.youtube.com/watch?v=9NO2rKnC6Ug&feature=youtu.be&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=29m24s
Give me the xml of your category field and I will see it I can help you.
The conventions are strongly following that if Joomla. So just researching how you would normaly add categories to your component and views if you where to hand code it should resolve the issue.
I think the first tutorial says that JCB is for PHP developers who know the Joomla API well enough to build a component manually. Since if you do not know the Joomla API, you will be stuck making use of only the basic features of JCB.
But sure, give me a look at your category (field) XML and I should be able to fix this for you :)
Here's my XML:
Should do the trick.
Unfortunately that didn't work. Still functions the same. I didn't notice that almost always the view=waves, but when I edit one of the waves then save it, the url list view=Waves, with the capital, only after saving does this happen. I don't know if it's related but just some FYI
Please check out Sermon Distributors Implementation, since in it we give you first hand demonstration of using the category integration.
About he change of the capital, I don't think that matters since the view=thisValue is all ways converted to lower case in the controller.
any success?
I haven't gotten around to debugging it yet and getting a better understanding of categories. I just assumed adding the category field was enough for it to start working. But I'll look under the hood this week to better understand what Joomla! does when you add the category field so I'll know why it's not working.
hello.
i have same problem.
i can't select category.
One week I've done any tests that may be possible.
I've also reviewed many of your educational videos.
@Llewellynvdm I just wanted to report back that I found out what was causing the problem. Two things that you need to make sure are set correctly if any one of them is wrong it won't work.
In the xml for the field make sure you call out the plural of the view you want to add the category field to and make sure you set published equal to a number.
So the following in my xml got it to start working:
published="1"
extension="com_centgames.games
previously I had:
published="true"
extension="com_centgames"
So both values were wrong. I hope that helps anyone with this problem.
@Llewellynvdm you should update the default instructions about the "published" field since currently they suggest using "true/false" which is incorrect. I updated them on my local machine already.
From the Joomla website:
published (optional) (1/0/2/-2) is whether the drop down will show only published (1), unpublished (0), archived (2) or trashed (-2) categories. It is possible to combine different publishing status by entering the list of the corresponding numbers separated by comma (e.g. "0,2,-2" will display only unpublished, archived and trashed categories in the drop-down).
Okay, I have done that. But please note this will only work on new installs.