Tailor entries controller (relation manager) custom config

Hi, I’m using the Tailor entries field with displayMode: controller, which shows the relation controller.
I was wondering two things:

  1. How can I customize its list columns and manage form fields? I tried to add the regular relation controller properties like “view” or “manage”, but it does not work.
  2. How can I make it NOT show the manage popup but instead go to the edit page of that record. I know I could use a relation manager, but prefer to stick with controller as the sorting feature is important in this case.
    Hope someone can help me with this.
    Thanks!

Setting column: false or column: invisible should adjust how the columns are displayed.

To confirm, you want to create records with a popup but navigate using the controller? You might be able to specify a custom recordUrl in the controller configuration.

Hey @daft thank you for your answer:

Setting column: false or column: invisible should adjust how the columns are displayed.

remember is a tailor relation controller (entries… displayMode: controller). So you mean setting columns directly in the fields of the related blueprint? This would also affect it’s main list though. I thought that like in regular relation controller you could set a different form/view yaml for the relation controller.
This is in the services blueprint:

    productos:
        label: Productos
        type: entries
        source: Productos
        displayMode: controller
        toolbarButtons: create|add|remove
        translatable: false

Anyway using column I would only customize the view, but not the manage popup form. In fact this related blueprint has a menu of its own… so not only in the relation controller it can be managed…

So I thought of not allowing for the creation nor update of records… just selecting and sorting them in the relation controller. And that led me to question 2. But even though I just set the toolbar to add|remove, clicking on the record opens the manage popup for editing

You should be able to specify custom list columns with the following:

productos:
    label: Productos
    type: entries
    controller:
        list:
            columns: []

Does it work?

Hey @daft, the following code does not work. Regarding the list, it doesn’t change anything. And the manage works partially… cause it shows those fields, but below it places the original form in a tab.

productos:
        label: Productos
        type: entries
        source: Productos
        displayMode: controller
        toolbarButtons: add|remove
        translatable: false
        controller:
            controller:
                list:
                    columns: 
                        title:
                            label: 'Título'
                            type: text
            manage:
                form:
                    fields:
                        title:
                            label: 'Título'
                            tipe: text
                        description:
                            label: Descripcion
                            type: textarea

Hey @federico.schafer

No worries. We’ve added support for this in v3.6.11.

2 Likes

Hey @daft Already updated to 3.6.11. The list part is solved now. But for the manage property, the popup still shows the original form below (in a content tab). My field definition is this:

productos:
        label: Productos
        type: entries
        source: Productos
        displayMode: controller
        toolbarButtons: add|remove
        translatable: false
        controller:
            view:
                list:
                    columns:
                        title:
                            label: Producto
            manage:
                form:
                    fields:
                        title:
                            label: Producto
                        description:
                            label: descripción
                            type: textarea

and the popup looks like this:

One aditional question… if I add a mixin in the manage form, it complaints that it can’t find partial ‘_field_mixin’, (on line 97 of /var/www/html/nuthost/modules/system/traits/ViewMaker.php), but the same exact thing works in the blueprint… shoud I somehow change the source path when in relation controller?

Ah, yes, mixins won’t resolve in this context. You’ll need to explicitly define every field as if it were a plugin, although the model should be the same.

@daft the full form is still showing at the bottom, see my picture from the last response above