I tried to remove the wrapping div for the CType shortcut as follows:
tt_content.shortcut.prefixComment >
tt_content.stdWrap.innerWrap.override = |
tt_content.stdWrap.innerWrap.override.if {
equals = shortcut
value.field = CType
}
But it doesn't work, there's still a wrapping div around the content.
This will only work when you're using css_styled_content. Starting with version 7 (or 8?) TYPO3 uses fluid_styled_content as the default. Much nicer but very different. To change the rendering of CType 'shortcut' you can now override the default fluid template for this type.
https://docs.typo3.org/typo3cms/extensions/fluid_styled_content/Configuration/OverridingFluidTemplates/Index.html
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 using TYPO3 since version 3 but I have never tried to customize the TYPO3 BE.
Now, what annoys me more in the BE is that in 'Special Menus' the 'Selected Pages' field displays 3 lines by default. I wish to expand it to at least 10 lines.
Inspecting the BE page with FF Developer Tools shows:
<select id="tceforms-multiselect-57f39f13067b0673730065" size="3" class="formField.
Editing the size value to 10 in the Inspector is exactly what I need.
How could I change that size value in TYPO3?
#Markusson and #Vimal Usadadiya
As suggested deactivating and activating the extension did the trick. BTW no need to use Global. The code I put in ext_tables.php is:
$TCA['tt_content']['columns']['pages']['config']['size'] = 10;
You can override the default value by using below lines. You can put that lines into ext_tables.php file in your custom extension.
unset($GLOBALS['TCA']['table_name']['columns']['field_name']['config']['size']);
$GLOBALS['TCA']['table_name']['columns']['field_name']['config']['size'] = 10;
You can override this in your own extension via
$GLOBALS['TCA']['tt_content']['columns']['pages']['config']['size'] = 10;
Put it in ext:your_ext/Configuration/TCA/Overrides/tt_content.php
alternative in ext:your_ext/ext_localconf.php
TYPO3 Reference to override TCA
I am using TYPO3 7.6.2 and I can't use html inside the standard table element any more, because TYPO3 escape html tags inside the table element. Is there a specific RTE configuration which I have to enable or something else? My current RTE configuration looks like the following:
RTE.default {
contentCSS = EXT:my_distribution/Resources/Public/Css/rte.css
proc {
allowedClasses := addToList(blue, button, caption, center, more, responsive, responsive2, subcaption, white)
}
showButtons := addToList(pastetoggle)
buttons {
blockstyle.tags.p.allowedClasses := addToList(caption, subcaption, white)
blockstyle.tags.table.allowedClasses := addToList(responsive, responsive2)
textstyle.tags.span.allowedClasses := addToList(blue, center, more, subcaption, white)
link.properties.class.allowedClasses := addToList(button)
pastetoggle.setActiveOnRteOpen = 1
}
}
I don't want that an editor have to use plain html tables inside a text content element or a html content element.
It was no longer supported in TYPO3 7.6 + but you can also override it by
tt_content.table.20.innerStdWrap.htmlSpecialChars >
tt_content.table.20.innerStdWrap.parseFunc = < lib.parseFunc
in your setup file
Html not longer supported for CE table.
workaround 1: use html table in combination with rte
workaround 2: revoke security changes from the following patch https://review.typo3.org/#/c/45281/, if you trust your editors
I recommend workaround 1, but I think some editors will not like this solution. So maybe it is better to develop a simple extension which can handle flexible tables.
In one of my TYPO3 6.1 sites, when I insert a content element of the CType "menu" ("MenĂ¼/Sitemap"), this is simply not rendered in the frontend. If I choose another CType, the item is output.
I have checked in the TSOB, tt_content.menu is there (css_styled_content is included).
Also, it is in the right column which is rendered via csc.
temp.maincontent < styles.content.get
temp.maincontent {
select.where = colPos = 0
wrap = <div class="maintext">|</div>
// required = 1
}
How could I debug this?
There was a weird issue with multiple backend layouts, being rendered in various parts of the PAGE COA. I've solved it by avoiding multiple use of the same temp. object, defining one temp.homecontent and one temp.standardcontent so they are not conflicting anymore.
To answer my own question "how to debug this": Well, by debugging.
I disabled all my TS includes and created the most basic kind of site: page = PAGE and page.10 < styles.content.get. With this setup, the CType menu was appearing. So I tried continuing by adding each TS template and then, when it stopped working, by adding / removing temp.item by tempitem from the corresponding template. Until I found the conflicting part. Fairly basic. But as there were no errors or similar hints in TSOB, probably the only way.