You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encounter this issue is at the threshold of Bug/Feature.
Context: Our company is working on a list view that can be filtered from within the frontend. Filterable list items can be added via a block, each block item having a "category_selection" field. A dump of the item's category looks like the following in Twig:
Problem: Categories exposed by category_selection content type miss some field (e.g. ghostLocale, medias and most importantly parentId which we require to filter items in the frontend). There is no Twig function to resolve a full category (e.g., sulu_category_load) and no properties parameter as for e.g. smart_content to explicitly define the fields that should be resolved
Proposed solution
Depending on what fits best to the Sulu flavor of configuring content-types, either
Always expose all fields/values of a category to the Twig template so that it is identical with the items returned by sulu_categories()
OR add a properties collection-type parameter to category_selection
OR add a Twig function sulu_category_load to CategoriesBundle
The text was updated successfully, but these errors were encountered:
Problem description
I encounter this issue is at the threshold of Bug/Feature.
Context: Our company is working on a list view that can be filtered from within the frontend. Filterable list items can be added via a block, each block item having a "category_selection" field. A dump of the item's category looks like the following in Twig:
Now, compare this to an item returned via
sulu_categories()
:Problem: Categories exposed by
category_selection
content type miss some field (e.g. ghostLocale, medias and most importantly parentId which we require to filter items in the frontend). There is no Twig function to resolve a full category (e.g.,sulu_category_load
) and noproperties
parameter as for e.g.smart_content
to explicitly define the fields that should be resolvedProposed solution
Depending on what fits best to the Sulu flavor of configuring content-types, either
sulu_categories()
properties
collection-type parameter tocategory_selection
sulu_category_load
to CategoriesBundleThe text was updated successfully, but these errors were encountered: