TimOetting / kirby-builder

A site builder extension for Kirby CMS
398 stars 51 forks source link

translate: false for builder field? #152

Closed alancwoo closed 2 years ago

alancwoo commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Can confirm this issue unfortunately. Any news?

prookie commented 4 years ago

@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 commented 2 years ago

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.