I am using the method of defining Backend Layouts in a TSconfig file in a site package extension.
mod {
web_layout {
BackendLayouts {
# pagets__onecolumn
onecolumn {
title = One column
config {
backend_layout {
colCount = 1
rowCount = 1
rows {
1 {
columns {
...
etc
I would now like to define one of my own BE-Layouts as default.
I found a method of excluding BE-Layouts (such as "none") in the select list in page properties:
TCEFORM.pages.backend_layout_next_level.removeItems= -1
TCEFORM.pages.backend_layout.removeItems= -1
But what I really want is for TYPO3 to automatically assign my default BE-Layout to new pages (and not use the TYPO3 default).
Using TYPO3 8 (latest version)
In the TYPO3 page records there are two fields for backend layouts on the current page and backend layouts on subpages. The latter is assigned automatically to each of the pages in the tree below the page where you set it.
So you should just assign your default layout as backend layout on subpages within the root page and it will become the default for any page, that hasn't got a layout set itself.
You can override that by selecting another layout on a subpage, that will override the default setting for that particular part of the tree.
Related
I have defined a menu content element using typoscript:
lib.share = COA
lib.share {
wrap = <div class="shareLinkBlock">|</div>
1 = TEXT
1.data = page : title
...
I would like to add this menu to colPos 2 of every page, that is direct child of a certain page.
Is there any way to achieve that?
Thanks a lot!
A solution depends on the current realization of the page.
If you use only typoscript you can replace the colPos2 rendering with a COA where your typoscript is part one and the old rendering is a second part.
Using conditions can restrict the appearance to selected page trees.
In similar ways you can realize it with FLUID.
You can insert a fluid variable, filled with your typoscript in every page.
The restriction to special page trees can be realized with conditions in typoscript or in FLUID. Also you can use different page-layouts for pages with and without this menu.
another solution would be an additional backend column which gets inherited and where you fill in your menu for those pages where the menu starts being visible. (conditions like above)
EDIT:
if you want to enhance a given FLUID variable, defined in typoscript you can word with a COA:
:
10 = FLUIDTEMPLATE
10 {
:
variables {
enhancedColumn = COA
enhancedColumn {
10 = ..old definition ...
}
}
}
:
// make sure you use the correct conditions:
[PIDinRootline = 10]
...10.variables.20 < lib.footer
[global]
I use EXT:T3sBootstrap and define comprehensible voices for the layouts the editors may select ... this works fine with the following code:
ext_localconf.php :
# Set TCEFORM features
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:myExt/Configuration/PageTSConfig/TCEForm.ts">');
Configuration/PageTSConfig/TCEForm.ts :
TCEFORM {
tt_content {
layout {
addItems {
4 = special box
100 = extra
}
altLabels {
0 = Default
1 = image shadow
2 = line shadow
3 = line shadow inv
}
disableNoMatchingValueElement = 1
}
}
}
in my second site I want to be able to re-define these labels with comprehensible voices but, although the static template of the first site is not included, it takes this configuration and does not use the one I just defined in the new myExt ...
(Page) TSconfig is loaded independent from the TypoScript static templates. The way you currently load the TSconfig into TYPO3, it will be used for all websites in this TYPO3 instance. So, the TSconfig from your second site is simply overwritten by your first configuration shown above.
Since TYPO3 v7, you can use registerPageTSConfigFile to add TSconfig settings as needed into your different page trees and websites:
your_extension/Configuration/TCA/Overrides/pages.php
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
'your_extension',
'Configuration/PageTSConfig/TCEForm.ts',
'My TCEform config including custom altLabels'
);
This enables you to select the TSconfig in the page properties, where it will apply for all subpages.
You can find a working example here.
I'm new to TYPO3 and I often copy content elements in the TYPO3 backend module. All copies are suffixed. They are also disabled/hidden after copying.
Is it possible to remove the automatic suffix of a copied content element?
You can configure this behaviour in TYPO3 for each table with Page-/UserTSConfig:
TCEMAIN {
table {
tt_content {
// remove suffix from copied record
disablePrependAtCopy = 1
// optionally you can set copied record visible with
disableHideAtCopy = 1
}
}
}
As mentioned already above, you can individually set this for each known and editable table within TYPO3.
How can I rename a TYPO3 CMS backend field for authors? i.e. the mentioned field for content-elements of csc_styled_content?
In general, overriding label names can by done with Page TSconfig in the backend. The following example modifies the label of the subheader field.
TCEFORM {
tt_content {
subheader.label = My new Label-Name
}
}
There are two way to configure that adjustment in TYPO3.
Type your configuration changes directly to the page settings » resources » TypoScript Configuration » Page TSConfig (see the screenshot below)
as an alternative you can store that configuration directly in the file system - either in your custom extension (e.g. at typo3conf/ext/my_extension/Configuration/TSconfig/labels.t3s) or with a similar name in the global file storage (e.g. fileadmin/templates/configuration/...)
That's basically it to provide custom labels for any database table in the TYPO3 backend. Find more aspects that can be adjusted in the accordant Page TSconfig documentation.
If you want to rename a field of an extension like tx_news you could do it this way.
TCEFORM {
tx_news_domain_model_news {
title.label = Your New Label
}
}
Now there are two ways to get this to work:
Put it in Page TSConfig of the page settings
OR
Load it with your extension from a file (e.g. EXT:my_extension/Configuration/pageTSConfig.typoscript). For that you have to import this script by EXT:my_extension/ext_localconf.php!
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:my_extrension/Configuration/pageTSConfig.typoscript">');
I made an Extension with Extbase and iwant the detail view to be shown in a lightbox and it does. The Problem is: I dont want the main template (of the main page with navigation etc.) to be seen, but just the detailed view. What do I have to change, to exclude the Main Template?
Use dedicated typeNum for this content and in its TS configuration set: disableAllHeaderCode = 1, it can be compared to the common way of rendering pure AJAX types like showed in the other sample.
For an example put this into your TypoScript template
myPurePage = PAGE
myPurePage {
typeNum = 1234
10 < styles.content.get
config {
disableAllHeaderCode = 1
}
}
So if you'll call it by http://yourdomain.tld/?id=123&type=1234 it will show only content of the main column from page with UID 123 (without html, body sections, any navigations from default template, etc, etc)
An alternative to the solution #biesior provided: Use the extension typoscript_rendering. It provides a ViewHelper to generate a link that renders only the view for an extbase action, without the layout.