承接 itplusx/headless-container 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

itplusx/headless-container

最新稳定版本:v3.0.0

Composer 安装命令:

composer require itplusx/headless-container

包简介

Container Content Elements (EXT:container) json output for EXT:headless

README 文档

README

This TYPO3 extension makes it possible to use EXT:container together with EXT:headless.

Installation

Installation with composer (recommended)

$ composer require itplusx/headless-container

Installation with the TYPO3 Extension Manager

see: Extension Management

Requirements and compatibility

Requirement v1 & v2 v3
PHP >= 8.1 >= 8.1
TYPO3 12.4 & 13.4 12.4 & 13.4
Headless 4 4
Container 2 - 3.1.1 >= 3.1.2

Usage

  1. Include TypoScript (as described by the TypoScript Reference) or just add the Site Set to your Site Configuration (as described by the Site sets Reference)
  2. Register your custom container element (as described by EXT:container)
  3. Define TypoScript ...
    (assuming you CType is b13-2cols-with-header-container)
    • ... for simple container elements:
      tt_content.b13-2cols-with-header-container =< lib.container
      
    • ... for container elements with header TCA fields:
      tt_content.b13-2cols-with-header-container =< lib.containerWithHeader
      
    • ... for container elements with custom TCA fields:
      (see EXT:headless docs for further info)
      tt_content.b13-2cols-with-header-container =< lib.container
      tt_content.b13-2cols-with-header-container.fields.content.fields {
        myCustomField = TEXT
        myCustomField.field = myCustomTcaField
      }
      
  4. That's all! You should now see JSON output for your custom container element!

Example json output

{
  "id": 2,
  "type": "b13-2cols-with-header-container",
  "colPos": 0,
  "categories": "",
  "appearance": {
    "layout": "default",
    "frameClass": "default",
    "spaceBefore": "",
    "spaceAfter": ""
  },
  "content": {
    "header": "Container Header",
    "subheader": "Container Subheader",
    "headerLayout": 0,
    "headerPosition": "",
    "headerLink": "",
    "myCustomField": "myCustomValue",
    "items": [
      {
        "config": {
          "name": "header",
          "colPos": 200
        },
        "contentElements": [
          {
            "id": 3,
            "type": "text",
            "colPos": 200,
            "categories": "",
            "appearance": {...},
            "content": {...}
          }
        ]
      },
      {
        "config": {
          "name": "left side",
          "colPos": 201
        },
        "contentElements": [
          {
            "id": 4,
            "type": "text",
            "colPos": 201,
            "categories": "",
            "appearance": {...},
            "content": {...}
          },
          {
            "id": 9,
            "type": "text",
            "colPos": 201,
            "categories": "",
            "appearance": {...},
            "content": {...}
          }
        ]
      },
      {
        "config": {
          "name": "right side",
          "colPos": 202
        },
        "contentElements": [
          {
            "id": 5,
            "type": "text",
            "colPos": 202,
            "categories": "",
            "appearance": {...},
            "content": {...}
          }
        ]
      }
    ]
  }
}

Contribution

Any help on this project is very welcome! May it be as code contribution or just an idea for improvement. But we would like to ask you to follow some rules:

  • Issues:
    When adding issues please always describe the bug/feature/task as detailed as possible. Only providing a title is not enough. Please use issue templates.
  • Commits:
    Our team is following the Conventional Commits. We would like ask you stick to these rules whenever you want to contribute.
  • Pull Requests:
    Before you submit a PR please create an issue first and link it to the pull request or at least add a PR description with detailed information about what this PR does. Otherwise we are not able to decide if this PR is worth going into the main branch.

ITplusX - Internetagentur & Systemhaus

统计信息

  • 总下载量: 11.77k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-04