承接 supseven/inline-page-module 相关项目开发

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

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

supseven/inline-page-module

最新稳定版本:v3.0.1

Composer 安装命令:

composer require supseven/inline-page-module

包简介

Edit inline tt_content records in a page module view

README 文档

README

This is a TYPO3 extension that provides a page-module view for inline tt_content records of non-page records, like news.

Installation

Use composer to add the package as a dependency

composer require supseven/inline-page-module

Configuration

Default

Important: EXT:inline_page_module does not come with defaults, like for news. All fields that should have a page view must be defined by an integrator.

To add the function to a table, use the method \Supseven\InlinePageModule\PageModuleSwitcher::register in a TCA/Overrides/table.php file to generate the needed TCA settings. The function needs the name of the table as first parameter.

// Add to news table
\Supseven\InlinePageModule\PageModuleSwitcher::register('tx_news_domain_model_news');

With a backend layout

The second parameter can a be the name of a backend layout. The page module will then use this backend layout. This is useful if the backend layout should have a different column name or if the colPos value of the tt_content records differs from the inherited layout.

eg. with a PageTS like this

mod.web_layout.BackendLayouts.News {
    title = News Elements
    config.backend_layout {
        colCount = 1
        rowCount = 1
        rows.1.columns.1 {
            name = News Content
            colPos = 0
        }
    }
}

This backend layout can be used with

// Add to news table with backend layout "News"
\Supseven\InlinePageModule\PageModuleSwitcher::register(
    'tx_news_domain_model_news',
    'News'
);

All configurations for backend layouts remain unchanged, which includes EXT:content_defender restrictions.

Important: Having referenced records from multiple fields in several "colPos" in the same page layout view is currently not supported. Each field has its own view.

Restricting fields

If a table has several fields with inline relations to tt_content records, the page module switch is added to all of them. To restrict this to only one or several fields, add the names of those fields to the parameter $fields of the method:

// Add to news table, but only to own field
\Supseven\InlinePageModule\PageModuleSwitcher::register(
    'tx_news_domain_model_news',
    fields: ['tx_my_tt_content_field']
);

Extension Configuration

This extension provides a configuration List all available content elements in page module, which is disabled by default. A huge amount of content elements (e.g. provided from news records) can lead to a timeout, if the folder containing these inline content elements is accessed in the page module. This setting prevents from loading all content elements.

Usage

After following the example above, news records will have a "Edit in page view" button (red arrow):

News content elements in form

Clicking this button will open the page module with the referenced tt_content records:

News content in page module

In this view, all the common editing options, like drag-and-drop sorting or the "new" and "delete" buttons work like in the page module.

The "Go back..." button is a link to the form of the parent record.

In this view, the page-module navigation point on the left of the TYPO3 backend is not activated. Also, the page on which the parent record is, is (still) the selected.

Legal

License

This package is provided under the GPL v3 license. See the file LICENSE or https://www.gnu.org/licenses/gpl-3.0 for details.

Notices

TYPO3 is provided under the GPL license, v2 or later. See https://typo3.org/project/licenses for details.

The "News" packaged mentioned in this document refers to extension news provided under the GPL v2 or later

The extension icon is part of the the ionicons icon pack which is provided under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-only
  • 更新时间: 2023-04-18