Comments (4)
the defaults are set in the collection item view. I have to think about a generic improvement solution
from layoutcomponents.
Seems solved in Cockpit field layout as per other thread discussion there
from layoutcomponents.
Is this fixed? A look at the Response shows that the styles of an image does not get output:
components.js
{
"custom_image": {
"label": "Custom Image",
"dialog": "normal",
"children": false,
"fields": [
{
"name": "image",
"label": "Image",
"type": "asset",
"default": "",
"info": "",
"group": "",
"localize": false,
"width": "1-1",
"lst": true,
"acl": [],
"options": {
"styles": [
"Default",
"Placeholder"
]
}
}
],
"group": "media"
}
}
Response
{
"component": "custom_image",
"settings": {
"id": "",
"class": "",
"style": "",
"image": {
"path": "\/2019\/01\/24\/5c49eeada1071slide5.jpg",
"title": "slide5.jpg",
"mime": "image\/jpeg",
"description": "",
"tags": [],
"size": 262747,
"image": true,
"video": false,
"audio": false,
"archive": false,
"document": false,
"code": false,
"created": 1548349101,
"modified": 1548351106,
"_by": "5c49dd3c3361356bf0000243",
"width": 1600,
"height": 1069,
"colors": [
"#cbcbcb",
"#272727",
"#585858",
"#7a7a7a",
"#646464"
],
"folder": "",
"_id": "5c49eeae34366200290003b1"
}
}
}
from layoutcomponents.
Hey @mortensassi , the original issue was not related with image styles (styles are provided by custom addon), but with passing defaults to custom components fields, e.g.: default value of a textfield, dropdown, etc..
can you kindly open an issue on the image styles addon?
from layoutcomponents.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from layoutcomponents.