problem to add categories to admin view #172
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#172
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?
hello.
I created a Component called "library".
I created a field with the following specifications
Type : category
Name : catid
Data Type : int
XML :
type="category"
name="listcategory"
label="Select a category"
extension="com_library.lists"
scope=""
required="true"
show_root="false"
default=""
description="select one of the following categories"
class="inputbox"
published="true"
multiple="false"
showon=""
I created a Admin View called "list".
Add filed catid in list view
I linked view to component.
compile & install
insert category in library component
but in create list cannot select category. list is empety.
Export of Component is : https://www.dropbox.com/s/9u0uazi95acs99u/JCB_library.zip?dl=1
Try it without the
show_root="false"
since I see have categories in many of my components and it does not have that value set.The name must be catid
So the above should work, it does for me. I use categories all over the place.
Thank you very much.
I've been fixing this problem for a week.
What was breaking mine was the instructions for published: I was using "true" but that's not correct
JCB:
published (optional) (true/false) is whether the drop down will show only published or unpublished categories.
Joomla! Site:
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).
If you want to see what things you can use that affect the options list look here:
libraries/legacy/form/field/category.php