Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

translate: false for builder field? #152

Closed
alancwoo opened this issue Feb 28, 2020 · 5 comments · May be fixed by #182
Closed

translate: false for builder field? #152

alancwoo opened this issue Feb 28, 2020 · 5 comments · May be fixed by #182

Comments

@alancwoo
Copy link

Is there any way to prevent translation of a builder field? Applying translate: false to the field doesn't seem to have any effect:

example.yml

label: Example
type: builder
translate: false
fieldsets:
  ...
@piaaaac
Copy link

piaaaac commented May 18, 2020

Similar but slightly different issue: fields inside a builder field with translate: false don't seem to get the default language's value. Or better, they do in the panel but don't pass the value to the $page object in the template. Is this intended or for any reason? Hope I'm not missing something.

  mybuilder:
    label: Page Builder
    type: builder
    fieldsets:

      twocols:
        name: Two columns block
        preview: 
          snippet: blocks/twocols
          css: levignedisilvia-2/assets/css/panel.css
        defaultView: preview
        fields:
          text:
            label: Text
            type: textarea
          images:
            label: Images
            type: files
            translate: false # this field

@caplod
Copy link

caplod commented Aug 25, 2020

I have the exact same Problem:
the images are set to null in the english translations

how can I fix this?

name: Text (mit Bild)
tabs:
  ...
  imagetab:
    label: Bild
    fields:
      image:
        label: Bild
        type: files
        max: 1
        layout: cards
        translate: false # this field looks ok in backend (not editable)

@prookie
Copy link

prookie commented Sep 29, 2020

Can confirm this issue unfortunately. Any news?

prookie added a commit to prookie/kirby-builder that referenced this issue Sep 30, 2020
Fixes TimOetting#152
Solution is not the prettiest, but seems to work (at least for my use case).
Probably does not work in nested builders.
@prookie
Copy link

prookie commented Sep 30, 2020

@piaaaac @caplod My pull request fixes the described problem, just did it myself because I really needed this functionality in a customer project. Works stable in my tests, but nested builders probably do not work.

Problem is/was a big showstopper for usage of this plugin in a multi-language website imo.

@TimOetting
Copy link
Owner

Closing this issue because this plugin will no longer be maintained, as its main functionality can be replaced by Kirby's built-in Blocks Field and Layout Field.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
5 participants