grav
grav copied to clipboard
category and tags in Flex Objects
Hello,
while testing Flex Objects, I noticed some unexpected behaviours. First, here's relevant parts of my custom Flex Object definition:
test_tags:
type: selectize
size: large
label: Test Tags
classes: fancy
validate:
type: commalist
categories_and_tags:
type: taxonomy
label: Category and Tag
multiple: true
validate:
type: array
list:
title: title
fields:
test_tags:
- test_tags do not have the autocomplete function, otherwise found in
taxonomy
field type. This is very very helpful in creating a catalog or any other type of organized data. - test_tags results in
["Test1","Test2","Test3"]
in list view, typical array/plain text representation. - test_tags cannot be searched when other text fields can. We could expect the field to be searchable, given its plain text representation.
- no matter how I try to configure it, in list view,
taxonomy
never displays. However this way we have the autocomplete function.
I think I tried many combinations, if not every possible one, so I decided to open this issue.
Is there something else I can try?
As usual, thank you!
You need to implement support for the taxonomy for your type, it's not automated (yet). For now, taxonomy works only for pages and only by using the default field.
Thank you, that explains
- no matter how I try to configure it, in list view, taxonomy never displays. However this way we have the autocomplete function.
So, creating
test_tags:
type: selectize
size: large
label: Test Tags
classes: fancy
validate:
type: commalist
and
test_category:
type: selectize
size: large
label: Test Category
classes: fancy
validate:
type: commalist
would be a way to achieve data organization, mimicking Category and Tags, right? That leads to the other part of the strange behaviour:
- test_tags do not have the autocomplete function, otherwise found in
taxonomy
field type. This is very very helpful in creating a catalog or any other type of organized data.- test_tags results in ["Test1","Test2","Test3"] in list view, typical array/plain text representation.
- test_tags cannot be searched when other text fields can. We could expect the field to be searchable, given its plain text representation.
Am I doing something wrong in blueprint's field definition?
Thank you!
This probably should be opened up on Flex-Objects repo. I can't transfer it because that's under TrilbyMedia github user.
This probably should be opened up on Flex-Objects repo. I can't transfer it because that's under TrilbyMedia github user.
https://github.com/trilbymedia/grav-plugin-flex-objects/issues/113
Done!
Thanks!
@mahagr I was wondering if there's a timeframe for this feature as well as for other enhancements to Flex Objects. Thanks!
There is no timeframe for this feature at this point; I have used tags in some custom projects, but basically, it is using custom code to do that.
Hello, just wondering if any progress has been made on integrating tags and categories into flex-objects.
Or if there are any plans to insert such feature into Grav's roadmap. Other interesting features would be:
- relations between objects
- multi-language support as it exists for Pages
Thank you!
No progress on tags or language support (out of the box), but we have done some work towards object relationships as it's required in our upcoming API.
Both tags and language support can be added to your objects even now (as pages do), but they require some coding to be done.
No progress on tags or language support (out of the box), but we have done some work towards object relationships as it's required in our upcoming API.
Thanks! Hope it will be documented on Grav Learn.
Both tags and language support can be added to your objects even now (as pages do), but they require some coding to be done.
Thanks again, it's not the first time I read this, but I have absolutely no clue on where to find the related documentation and use it as a start. A recipe would be just perfect!
PS: I am sensing that 1.8 release is getting closer and can't wait for it!
Again, thanks for the awesome product!
Just take a look into Flex Pages, they have implemented both. That said, the current implementation tries to mimic the old pages (which are still in use in frontend).