Closed phoban01 closed 5 years ago
Do you have an example yaml file for this feature?
How about this:
volumes:
- name: Uploads
handle: uploads
type: Local
hasUrls: true
url: "/uploads"
settings:
path: "uploads/"
fieldLayout: {}
fieldGroups:
- Blog
fields:
- name: Hero Image
handle: hero
type: Assets
group: Blog
useSingleFolder: true
defaultUploadLocationSource: "*"
defaultUploadLocationSubpath: "blog/"
singleUploadLocationSource: "*"
singleUploadLocationSubpath: "blog/"
restrictFiles: true
limit: 1
allowedKinds:
- image
sources: "*"
- name: Caption
handle: caption
group: Blog
type: PlainText
- name: Body
handle: body
group: Blog
type: PlainText
typesettings:
multiline: true
sections:
- name: Blog
handle: blog
type: channel
siteSettings:
- hasUrls: true
uriFormat: "blog/{slug}"
template: "templates/blog/_index.twig"
entryTypes:
- name: Blog
handle: blog
sectionHandle: blog
hasTitleField: true
titleLabel: Title
fieldLayout:
Content:
- hero
- caption
- body
Looks good.
Small update to console/controllers/ImportController.php that reads a YAML file, converts to JSON and hits the import service.