How to customize field size in TYPO3 BE - typo3

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

Related

Make the default value 0 in the section appearance for show in section menus - (typo3)

I've created my own content elements and can't figure out how to give the show in section menus under appearance value of 0 so its not automatically toggled active.. Does anybody know how to do this?
You can do that by setting / overriding a default value by TCA override. Place the following line of code
$GLOBALS['TCA']['tt_content']['columns']['sectionIndex']['config']['default'] = 0;
to the following file of your extension:
your_ext/Configuration/TCA/Overrides/tt_content.php
More information about extending the TCA --> TYPO3 documentation "Extending the TCA"
I would recommend configuring this in your_ext/Configuration/TsConfig/Page:
mod.wizards.newContentElement.wizardItems.common.elements.yourCE.tt_content_defValues {
sectionIndex = 0
}
This has the advantage that
it is configured only when the CE is constructed
the editor has the possibility to change it if he/she wants to
it is only effected on your CE

How to get the Log In Form on every page? (for example in footer) Typo3

Is there a way to get the Log In Form for Frontend User on every page? I would prefer the footer.
And if someone is logged in you can see the Log Out Button.
Is this possible without an extension?
You can copy the default felogin output to wherever you want on your template. For example use lib.login, copy the plugin.tx_felogin_pi1 into it, change the template and you're fine.
lib.login < plugin.tx_felogin_pi1
lib.login.templateFile = path/to/your/template/file
More you can see in the official documentation: https://docs.typo3.org/typo3cms/extensions/felogin/8.7/Configuration/Index.html
In general there are three options to include a CE (e.g. the Login-form) on all pages:
use typoscript to generate the CE. Normally the CEs are defined in tt_content, from where you could copy the base configuration and adapt it. For some plugins you also find a complete configuration beyond lib (for newer extensions there you only find the settings). All the configuration must be done in typoscript.
use typoscript to render the content of a special page/ column. In this variant you have a special page only for content referenced somewhere else. Advantage: you could configure the CE in the usual way. Try to avoid referencing CEs by uid as an editor might disable or delete the current element(s) and insert a new one which would not be rendered.
use a special column in your root page and inherit the content to all subpages. Advantage: you could change the inherited content easily on each page (if this column is available in the current backend layout).
example for 3:
variables {
footer_content < styles.content.get
footer_content.select.where = colPos = 15
footer_content.slide = -1
}

Can i add more colors in tx_gridelements

i want to add more backend colors in Typo3 Gridelements.
Under Typo3 -> List -> CE Backend Layout is an Option "Frame" with 4 colors and i want to add more colors.
Is there a way for it?
Best Regards
You probably want to use something like this in your pageTS:
TCEFORM.tx_gridelements_backend_layout{
frame{
addItems{
10 = unicorn-pink
}
}
}
You can change every field from every table with this method.
See https://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/TCEform/Index.html for further information about this.
Just adding the value in TCEFORM might not be enough, since you will need to add CSS to get the colors assigned to those new classes.
So you will at least need to have a small extension providing the items, a basic folder structure as in the usual sitepackages and the CSS embedded via ext_tables.php and/or ext_localconf.php

Typo3: How to disable Bootstrap Language Menu

I installed the latest Typo 3 LTS 7 Version and used Bootstrap with it. I did not enable any multilanguage stuff, nor do I want it to be displayed. How to disable the language ("Deutsch, Dansk, English") which is presented after every footer?
Thanks a lot!
OK, I found a solution.
Just add
page.theme.metasection.enable = 0
to the Template Constants.
This only disables the Language Footer.
I do not know however, how to configure it (i.e. replace the non existing language names like Dansk)
The language menu is being built in EXT:bootstrap_package/Configuration/TypoScript/setup.txt (line 40).
lib.language = COA
lib.language {
...
}
It takes the languages you have defined in the backend (database), assigns information to these and builds up the HMENU. In the default bootstrap_package configuration's case that should be the languages with the ids 0,1,2.
lib.language.20.special.value = 0,1,2
You could change the values there, or get rid of the whole section all together (so not to load it at all) depending on what you want to achieve. If you want to remove it you need to remove the references in the template itself, too.
EXT:bootstrap_package/Resources/Private/Partials/Page/Structure/Footer.html (line 21):
<div class="col-md-4 language">
<f:cObject typoscriptObjectPath="lib.language"/>
</div>
.. and from all other places you are referencing lib.language.

TYPO3 - How to add a placeholder to an input field?

In TYPO3 (7.2.0) using the standard template engine, is there a way to add a placeholder attribute to the standard mail form text input?
At the moment I am using JavaScript to convert the labels into placeholders, but I am open to suggestions on a better way to do this...
The suggested solution of #biesior does only work for EXT:form 7.4 and higher (see changelog). The supplied picture shows the form wizard of TYPO3 7.5 or 7.6. In 7.2 you won't find any placeholder attribute in the wizard.
I recommend updating to TYPO3 7.6 since this version includes a major rewrite of EXT:form. You will be able to use fluid templates to customize your forms. Furthermore HTML5 attributes are possible. Before the rewrite the set of allowed attributes was quite limited. Now you are able to add all attributes you can think of (for example "data-"). See changelog.
If you have any questions regarding EXT:form join the channel on Slack. If you don't know Slack yet, check out the invite function.
During form fields editing you have many properties, also Placeholder
in text version it will be:
10 = TEXTLINE
10 {
type = text
class = foo-class
id = foo-id
name = foo
placeholder = Hmmm?
required = required
label {
value = My Field
}
}