在TYPO3 6.x中,如何一次禁用更大的BE字段块?

时间:2013-09-08 11:00:04

标签: typo3 backend typoscript tsconfig

由于在那个小盒子中配置排除字段很痛苦且不完整,我使用TCEFORM来简化编辑器的TYPO3后端。我想在TYPO3 6.x中,这可能会更清洁,但事实并非如此。一切都在那里,而且通过FAL,引入了更多可能引起用户混淆的领域。

我就是这样做的(在用户组TSConfig中):

page.TCEFORM.tt_content.longdescURL.disabled  = 1

语法对应于表名和列名,AFAIK。

我会在答案中包含我当前的设置(小心,4.5中的Legacy,那里可能有黑洞),因为它很长。

如果禁用标签中的所有字段,标签本身将会消失。

问题是:

有更简单的方法吗? 比如,一次禁用整个标签? 或者禁用所有内容并仅从头开始包含所需的字段?

2 个答案:

答案 0 :(得分:1)

这是我当前的用户组TSConfig设置。注意,这可能是不完整的,并且可能包含过时的项目(它来自4.5)。

这可能是从DB结构自动创建的。对于tx_news,我刚刚通过SHOW COLUMNS from tx_news_domain_model_news

获得了列标题
####################################################
# Pages ###########################################
#################################################### 

# "General"
page.TCEFORM.pages.doktype.disabled = 0
page.TCEFORM.pages.title.disabled = 0
page.TCEFORM.pages.nav_title.disabled  = 0
page.TCEFORM.pages.subtitle.disabled  = 1
page.TCEFORM.pages.alias.disabled  = 1
page.TCEFORM.pages.tx_realurl_pathsegment.disabled = 1
page.TCEFORM.pages.tx_realurl_exclude.disabled = 1


# "Access"
page.TCEFORM.pages.hidden.disabled = 0
page.TCEFORM.pages.nav_hide.disabled = 0
page.TCEFORM.pages.extendToSubpages.disabled = 1
page.TCEFORM.pages.fe_group.disabled = 0
page.TCEFORM.pages.fe_login_mode.disabled = 1
page.TCEFORM.pages.starttime.disabled  = 0
page.TCEFORM.pages.endtime.disabled  = 0

# "Metadata"
page.TCEFORM.pages.abstract.disabled  = 0
page.TCEFORM.pages.keywords.disabled = 1
page.TCEFORM.pages.description.disabled = 0
page.TCEFORM.pages.author.disabled = 1
page.TCEFORM.pages.author_email.disabled = 1
page.TCEFORM.pages.lastUpdated.disabled = 1


# "Appearance"
page.TCEFORM.pages.newUntil.disabled = 1
page.TCEFORM.pages.backend_layout.disabled  = 0
page.TCEFORM.pages.backend_layout_next_level.disabled  = 0
page.TCEFORM.pages.module.disabled = 1

# "Behaviour"
page.TCEFORM.pages.alias.disabled  = 1
page.TCEFORM.pages.target.disabled  = 1
page.TCEFORM.pages.crdate.disabled = 1
page.TCEFORM.pages.crdate.disabled = 1
page.TCEFORM.pages.url_scheme.disabled = 1
page.TCEFORM.pages.cache_timeout.disabled = 0
page.TCEFORM.pages.no_cache.disabled = 0
page.TCEFORM.pages.l18n_cfg.disabled  = 1
page.TCEFORM.pages.is_siteroot.disabled = 1
page.TCEFORM.pages.no_search.disabled = 1
page.TCEFORM.pages.editlock.disabled = 1
page.TCEFORM.pages.php_tree_stop.disabled = 1
page.TCEFORM.pages.mount_pid_of.disabled  = 1

# Categories
page.TCEFORM.pages.categories.disabled  = 1

# "Resources"
page.TCEFORM.pages.media.disabled  = 0
page.TCEFORM.pages.storage_pid.disabled  = 1
page.TCEFORM.pages.TSconfig.disabled  = 1

# Layout
page.TCEFORM.pages.layout.disabled  = 1


####################################################
# tt_content  ######################################
####################################################

# turn off language dropdown in monolingual sites (only!)
page.TCEFORM.tt_content.sys_language_uid.disabled  = 0

#Frame 
page.TCEFORM.tt_content.section_frame.disabled  = 1

#Checkbox Index (Seiteninhalt wird in Menus ausgegeben) ?
page.TCEFORM.tt_content.sectionIndex.disabled  = 1

#Old school stuff
page.TCEFORM.tt_content.spaceBefore.disabled  = 1
page.TCEFORM.tt_content.spaceAfter.disabled  = 1

#others
page.TCEFORM.tt_content.altText.disabled  = 1
page.TCEFORM.tt_content.select_key.disabled  = 1
page.TCEFORM.tt_content.linkToTop.disabled  = 1
page.TCEFORM.tt_content.rte_enabled.disabled  = 0
page.TCEFORM.tt_content.colPos.disabled  = 0
page.TCEFORM.tt_content.splash_layout.disabled  = 1
page.TCEFORM.tt_content.titleText.disabled  = 1
page.TCEFORM.tt_content.categories.disabled  = 1
page.TCEFORM.tt_content.fe_users.lockToDomain.disabled  = 1

####################################################
# Section Header  ############################# 
####################################################
page.TCEFORM.tt_content.header.disabled  = 0
page.TCEFORM.tt_content.header_position.disabled  = 1
page.TCEFORM.tt_content.header_layout.disabled  = 0
page.TCEFORM.tt_content.header_link.disabled  = 1

####################################################
# Section Text #####################################
####################################################
page.TCEFORM.tt_content.text_align.disabled  = 1
page.TCEFORM.tt_content.text_face.disabled  = 1
page.TCEFORM.tt_content.text_size.disabled  = 1
page.TCEFORM.tt_content.text_color.disabled  = 1
page.TCEFORM.tt_content.text_properties.disabled  = 1

###################################################
# Section Table #####################################
####################################################
page.TCEFORM.tt_content.table_bgColor.disabled  = 1
page.TCEFORM.tt_content.table_bordersection_frame.disabled  = 1
page.TCEFORM.tt_content.table_cellspacing.disabled  = 1
page.TCEFORM.tt_content.table_cellpadding.disabled  = 1


####################################################
# Access ######################
####################################################
page.TCEFORM.tt_content.starttime.disabled  = 0
page.TCEFORM.tt_content.endtime.disabled  = 0
page.TCEFORM.tt_content.date.disabled  = 1
page.TCEFORM.tt_content.fe_group.disabled  = 0


#################################################################
# textpic ######################################
################################################################# 

# Appearance
page.TCEFORM.tt_content.longdescURL.disabled  = 1
page.TCEFORM.tt_content.image_link.disabled  = 0
page.TCEFORM.tt_content.image_zoom.disabled  = 1
page.TCEFORM.tt_content.imageorient.disabled = 1
page.TCEFORM.tt_content.imagecols.disabled = 1
page.TCEFORM.tt_content.image_effects.disabled = 1
page.TCEFORM.tt_content.spaceBefore.disabled = 1
page.TCEFORM.tt_content.spaceAfter.disabled = 1
page.TCEFORM.tt_content.section_frame.disabled = 1
page.TCEFORM.tt_content.imagewidth.disabled = 1
page.TCEFORM.tt_content.imageheight.disabled = 1
page.TCEFORM.tt_content.imageborder.disabled = 1
page.TCEFORM.tt_content.image_compression.disabled = 1
page.TCEFORM.tt_content.imagecaption_position.disabled = 1
page.TCEFORM.tt_content.image_noRows.disabled = 1
page.TCEFORM.tt_content.image_frames.disabled  = 1
page.TCEFORM.tt_content.layout.disabled  = 1

# media
page.TCEFORM.sys_file_reference.alternative.disabled  = 1
# in FE, use caption as altText (I know)
page.TCEFORM.sys_file_reference.description.disabled  = 0
page.TCEFORM.sys_file_reference.title.disabled  = 1
page.TCEFORM.sys_file_reference.link.disabled  = 0
#*******Imageorient 
#mod.wizards.newContentElement.wizardItems.common.elements.textpic.tt_content_defValues.imageorient = 2
#mod.wizards.newContentElement.wizardItems.common.elements.image.tt_content_defValues.imageorient = 2

## alle Werte von imageorient
# 0, 1, 2, 8, 9, 10, 17, 18, 25, 26 
#0 = Above, center
#1 = Above, right
#2 = Above, left
#8 = Below, center
#9 = Below, right
#10 = Below, left
#17 = In text, right
#18 = In text, left
#25 = In text, right (nowrap)
#26 = In text, left (nowrap)
# liesse sich sünst gut anpassen
#TCEFORM.tt_content.imageorient.removeItems = 0, 1, 8, 9, 10, 17, 18, 25, 26 
TCEFORM.tt_content.imageorient.disabled = 1

##########################################
# tx_news ################################
##########################################

page.TCEFORM.tx_news_domain_model_news.title.disabled = 0
page.TCEFORM.tx_news_domain_model_news.teaser.disabled = 1
page.TCEFORM.tx_news_domain_model_news.bodytext.disabled = 0
page.TCEFORM.tx_news_domain_model_news.datetime.disabled = 0
page.TCEFORM.tx_news_domain_model_news.archive.disabled = 0
page.TCEFORM.tx_news_domain_model_news.author.disabled = 1
page.TCEFORM.tx_news_domain_model_news.author_email.disabled = 1
page.TCEFORM.tx_news_domain_model_news.categories.disabled = 0
page.TCEFORM.tx_news_domain_model_news.related.disabled = 1
page.TCEFORM.tx_news_domain_model_news.related_from.disabled = 1
page.TCEFORM.tx_news_domain_model_news.related_files.disabled = 1
page.TCEFORM.tx_news_domain_model_news.related_links.disabled = 1
page.TCEFORM.tx_news_domain_model_news.type.disabled = 0
page.TCEFORM.tx_news_domain_model_news.keywords.disabled = 1
page.TCEFORM.tx_news_domain_model_news.tags.disabled = 1
page.TCEFORM.tx_news_domain_model_news.media.disabled = 0
page.TCEFORM.tx_news_domain_model_news.internalurl.disabled = 1
page.TCEFORM.tx_news_domain_model_news.externalurl.disabled = 1
page.TCEFORM.tx_news_domain_model_news.istopnews.disabled = 0
page.TCEFORM.tx_news_domain_model_news.content_elements.disabled = 1
page.TCEFORM.tx_news_domain_model_news.path_segment.disabled = 1
page.TCEFORM.tx_news_domain_model_news.alternative_title.disabled = 1
page.TCEFORM.tx_news_domain_model_news.rte_disabled.disabled = 1
page.TCEFORM.tx_news_domain_model_news.import_id.disabled = 1
page.TCEFORM.tx_news_domain_model_news.import_source.disabled = 1
page.TCEFORM.tx_news_domain_model_news.is_dummy_record.disabled = 1

答案 1 :(得分:0)

您应该在TSconfig中设置[BE][explicitADmode] = explicitAllow,而不是通过Install Tool禁用此功能,并创建一个只允许显示您需要的字段的后端用户组。

然后仅将TSconfig用于未在TCA中设置为排除字段的字段。