Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

ImageStyles does not work for localised Properties #25

Open
DerGary opened this issue May 6, 2022 · 0 comments
Open

ImageStyles does not work for localised Properties #25

DerGary opened this issue May 6, 2022 · 0 comments

Comments

@DerGary
Copy link

DerGary commented May 6, 2022

It seems like ImageStyles does not work for Properties which are localised but we could need this when the images contain marketing texts they can be in different languages. Currently it replaces the content only for the default language which in this example is englisch but does not replace the content in other languages like german (de).

Property configuration:
image

Options:

{
  "fields": [
    {
      "type": "repeater",
      "label": "Videos",
      "options": {
        "fields": [
          {
            "type": "text",
            "label": "Video"
          }
        ],
        "limit": 1
      }
    },
    {
      "type": "repeater",
      "label": "Iframes",
      "options": {
        "fields": [
          {
            "type": "text",
            "label": "Iframe"
          }
        ],
        "limit": 1
      }
    },
    {
      "type": "repeater",
      "label": "Images",
      "options": {
        "fields": [
          {
            "type": "image",
            "label": "Image",
            "options": {
              "styles": [
                "BrandNewsTitleOnTop",
                "BrandNewsTitleOnSide"
              ]
            }
          }
        ]
      }
    }
  ],
  "limit": 1
}

JSON Result:

a62f8733-5637-4250-b6e3-14f2d5ed6351

{
  "Title": "Looks that tell your Story",
  "Title_de": "Looks die dein Leben schreibt",
  "Subtitle": "When the new shirt looks amazing. On him.",
  "Subtitle_de": "Wenn dein neues Shirt toll aussieht. An ihm.",
  "BackgroundColor": "rgb(85, 85, 85)",
  "Brand": [
    {
      "_id": "608905c3333832000b00030b",
      "link": "brand",
      "display": "brand1"
    },
    {
      "_id": "608905cd333832000c000196",
      "link": "brand",
      "display": "brand2"
    },
    {
      "_id": "608905df333832000b000037",
      "link": "brand",
      "display": "brand3"
    }
  ],
  "Layout": "Title on side",
  "Content": [
    {
      "field": {
        "type": "repeater",
        "label": "Images",
        "options": {
          "fields": [
            {
              "type": "image",
              "label": "Image"
            }
          ]
        }
      },
      "value": [
        {
          "field": {
            "type": "image",
            "label": "Image"
          },
          "value": {
            "path": "/storage/uploads/2021/04/27/6087db5ebef6bbackground.jpeg",
            "styles": [
              {
                "style": "BrandNewsTitleOnTop",
                "path": "/storage/styles/brandnews/608923d4333832001100001c/fe963f9d5ec553fdb75ecf265d61b62d_1600x900_90_1619516256_thumbnail_adb115059e28d960fa8badfac5516667.jpeg?cimgt=1624367909"
              },
              {
                "style": "BrandNewsTitleOnSide",
                "path": "/storage/styles/brandnews/608923d4333832001100001c/8b698fb958f0f107c9d270d547cfaf4f_1700x800_90_1619516256_thumbnail_adb115059e28d960fa8badfac5516667.jpeg?cimgt=1624367909"
              }
            ],
            "cimgt": 1624367909
          }
        },
        {
          "field": {
            "type": "image",
            "label": "Image"
          },
          "value": {
            "path": "/storage/uploads/2021/04/28/6089237db9299background_xl2.jpeg",
            "styles": [
              {
                "style": "BrandNewsTitleOnTop",
                "path": "/storage/styles/brandnews/608923d4333832001100001c/a66aae1c7ec7c8775a4095694bfb3a90_1600x900_90_1619600255_thumbnail_adb115059e28d960fa8badfac5516667.jpeg?cimgt=1624367910"
              },
              {
                "style": "BrandNewsTitleOnSide",
                "path": "/storage/styles/brandnews/608923d4333832001100001c/1fa58c44af1d30a5101a350ffacca73e_1700x800_90_1619600255_thumbnail_adb115059e28d960fa8badfac5516667.jpeg?cimgt=1624367910"
              }
            ],
            "cimgt": 1624367910
          }
        },
        {
          "field": {
            "type": "image",
            "label": "Image"
          },
          "value": {
            "path": "storage/uploads/100.jpg",
            "styles": [
              {
                "style": "BrandNewsTitleOnTop",
                "path": "/storage/styles/brandnews/608923d4333832001100001c/7c260d0d69168f746cb6aa4a9dd114bc_1600x900_90_1619593373_thumbnail_adb115059e28d960fa8badfac5516667.jpg?cimgt=1624367910"
              },
              {
                "style": "BrandNewsTitleOnSide",
                "path": "/storage/styles/brandnews/608923d4333832001100001c/e98e5b9fdc66ee7abc0641f46e907915_1700x800_90_1619593373_thumbnail_adb115059e28d960fa8badfac5516667.jpg?cimgt=1624367910"
              }
            ],
            "cimgt": 1624367910
          }
        }
      ]
    }
  ],
  "Content_de": [
    {
      "field": {
        "type": "repeater",
        "label": "Images",
        "options": {
          "fields": [
            {
              "type": "image",
              "label": "Image"
            }
          ]
        }
      },
      "value": [
        {
          "field": {
            "type": "image",
            "label": "Image"
          },
          "value": {
            "path": "/storage/uploads/2021/04/27/6087db5ebef6bbackground.jpeg"
          }
        },
        {
          "field": {
            "type": "image",
            "label": "Image"
          },
          "value": {
            "path": "/storage/uploads/2021/04/28/6089237db9299background_xl2.jpeg"
          }
        }
      ]
    }
  ],
  "DateRange": [
    {
      "field": {
        "type": "set",
        "label": "DateRange",
        "required": true,
        "options": {
          "fields": [
            {
              "name": "from",
              "type": "date"
            },
            {
              "name": "to",
              "type": "date"
            }
          ]
        }
      },
      "value": {
        "from": "2063-01-01",
        "to": "2064-01-01"
      }
    }
  ],
  "_mby": "60869361333832000c0002b8",
  "_by": "60869361333832000c0002b8",
  "_o": 1,
  "_modified": 1624368352,
  "_created": 1619600340,
  "_id": "608923d4333832001100001c",
  "_pid": null,
  "TitleColor": "rgb(255, 255, 255)",
  "SubtitleColor": "rgb(255, 255, 255)"
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant