mattbrailsford / umbraco-fluidity

A fluent CRUD user interface generator for Umbraco
https://our.umbraco.org/projects/backoffice-extensions/fluidity/
Apache License 2.0
48 stars 40 forks source link

Unable to View Details of Nodes with Empty Names in List View #100

Closed Nicholas-Westby closed 5 years ago

Nicholas-Westby commented 5 years ago

You can setup Fluidity to display a list view like so:

no-name

This is problematic, for example, if a girl has no name or a man is no one.

When the name is an empty string, there is no text to link, and it seems the name text is the only thing that can be clicked to view the details for a node. If I click anything else, it merely selects the node in the list view rather than opening it.

FYI, this is perfectly valid data in my case (e.g., if somebody wants to submit a review anonymously).

mattbrailsford commented 5 years ago

As mentioned in the docs, all entities MUST have a name https://umco.github.io/umbraco-fluidity/api/collections/#defining-an-entity-name. As we are reusing the Umbraco UI, this is how the Umbraco list view works that it's only the name that is clickable.

In your scenario, I would suggest that you either store a default value such as "Anonymous" for anyone that doesn't supply a name, or you create a result column on your model that you use only for the list view that is either the reviewers name or "Anonymous" if not defined. This way you can maintain an empty value in your DB, but provide Fluidity a required value for the list view.