core icon indicating copy to clipboard operation
core copied to clipboard

Extend attributes Select / Tags

Open stefanheimes opened this issue 9 years ago • 4 comments

I have a problem with the filter. If i using a select or Tag the system used the attributes settings to know which field should be used for the GET-Parameter and which attribute should be used for the displaying value.

Now i have the problem that for the filter i want to use another setup. In the backend i want the attribute with the short name but for the frontend and filter i want another attribute with a long name for the users.

My idear is that we could add a field to the attributes where we can define which field we want to use. When the attributes build the filter it can use this field instead of the field defined in the basic attribute settings.

This function should only work if we in the FE and a field is set in the configuration.

We have to to this for the 4 attributes. Select/Tags/Trans. Select/Trans. Tags

What to you think about this feature?

stefanheimes avatar Mar 23 '16 11:03 stefanheimes

@stefanheimes : I don't understand what you mean - you can use a separate label for the filter widget.

See screenshot

FireShot Pro Webpage Screenshot #815 - 'MetaModels I mm220 dev metamodel me' - mm

zonky2 avatar Jan 22 '22 17:01 zonky2

@stefanheimes maybe we add this https://github.com/MetaModels/core/issues/1055

zonky2 avatar Jan 22 '22 18:01 zonky2

@stefanheimes is the question still relevant? you can specify the things individually...

zonky2 avatar Aug 28 '22 15:08 zonky2

Es geht um unterschiedliche Ausgaben der "Option-Werte" zwischen Backend (Eingabemaske) und Frontend (Filterwidget)

z.B. im BE ein Select mit DE, FR, UK usw. aber im Filterwidget ein select mit Deutschland, Frankreich, Großbritanien usw.

Lösungen:

  1. eigene Filterregel mit neuer Ausgabe
  2. aktuelle Filterregel(n) erweitern mit Auswahl Attribut des referenzierem Model für Option-Werte
  3. Anzeige im BE ändern z.B. über getOptionListener

siehe u.a. https://github.com/MetaModels/attribute_select/issues/65 https://github.com/MetaModels/attribute_tags/issues/70

Interessant wäre Möglichkeit 2, wenn das Model nicht referenziert ist - dann sind die Option-Keys und die Option-Werte gleich, d.h. man kann sich für einen Aliaswert oder für einen normalen Textwert entscheiden - das aber nicht separat zuweisen.

zonky2 avatar Aug 31 '22 17:08 zonky2