Lately here were some posts that have to do with the fact that in multi-language websites there are several content files each web page. This is right and ok.
But such pages have also cross-language fields, such as links on own pictures, prices, dates and suchlike, which must have the same value in all languages.
In order to solve this problem of cross-language fields in the panel, I propose to introduce a new parameter, e.g. “language independent”, for fields in blueprint files.
In these can then be determined the language, in which the respective entry for all languages is stored from the panel.
I do not want to take the default language for this, the default language of a website may be changed later…
When such a field is retrieved from a template or a snippet or the panel, the value of the field from the language specified in the blueprint should be determined automatically across all languages.
I know of @texnixe (Add $field->label
to get the label of a panel field) that this in Kirby does not exist and may be difficult to implement.
Therefore, I could also imagine that for the panel an artificial language, e.g. “nal” (“not a language”), is implemented firmly, where in such a case automatically all the values of the cross-language fields are stored.
When such a field is retrieved from a template or a snippet or the panel, the value of the field from the language “nal” should be determined automatically across all languages. Thus, these fields are no longer stored in the normal language content files.
For such a field the new parameter, e.g. “language independent”, in the blueprint should be set to true, the default value should be false.