You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否为frame_class设置默认值?偏好默认无框架(附示例)

How to Set none as the Default Value for tt_content.frame_class in TYPO3

Hey there! Great question—yes, you absolutely can set none as the default value for the frame_class field of tt_content elements, and your initial configuration guess is on the right track. Let me walk you through the exact working solutions and details to make this happen:

Working Page TSconfig Approach

Your proposed code is almost spot-on. To make it take effect, add this configuration to your Page TSconfig (you can do this either via the "Resources" tab in a page's properties in the TYPO3 backend, or by adding it to a .tsconfig file in your site package):

TCEFORM {
  tt_content {
    frame_class {
      default = none
    }
  }
}

This will set the "Frame" dropdown to none by default every time you create a new content element. Don't forget to clear your TYPO3 cache after adding this—changes to TSconfig require a cache flush to apply.

Verify the Change

After updating the configuration and clearing the cache, create a new content element. Head to the "Appearance" tab, and you should see "None" pre-selected in the "Frame" option.

System-Wide Default: TCA Override

If you need this default to apply across your entire TYPO3 instance (all sites), you can override the TCA directly in your site package. Create or edit the file Configuration/TCA/Overrides/tt_content.php and add:

<?php
$GLOBALS['TCA']['tt_content']['columns']['frame_class']['config']['default'] = 'none';

For TCA changes, you'll need to clear the system cache (not just the frontend/backend cache) to see the effect.

Edge Case Notes

  • If you have extensions that modify the frame_class field or set their own defaults, double-check the load order of your configurations. Page TSconfig takes precedence over TCA defaults, but some extensions might load their configurations later—adjust your site package's load order if needed.
  • Ensure none is an available option for frame_class. By default, TYPO3 includes this option, but if you've customized the allowed values in TCA, make sure none is present in the items array for the frame_class column.

内容的提问来源于stack exchange,提问作者Nicki Schinow

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 06:59:46