Allow HTML in TYPO3 Subheader - typo3

I couldn't find anything about this on the web or in the documentation, so I wonder if it's possible.
lib.stdheader.10.setCurrent.htmlSpecialChars = 0
Works fine for standard header and I already tried
lib.stdheader.20.setCurrent.htmlSpecialChars = 0
for subheader, but doesn't work.
Any hint is very appreciated!

Take a look at TypoScript Object Browser in Template module.
You'll see, that lib.stdheader.20 doesn't have setCurrent property. Instead it has bunch of properties, like 1., 2., ... and default. All of them correspond to header type: h1, h2, h3 etc. and default (which is h2).
So, you need to override htmlSpecialChars for each of them. Or, at least, for default, if you're not planning to use different subheader types:
lib.stdheader.20.1.htmlSpecialChars = 0
lib.stdheader.20.2.htmlSpecialChars = 0
...
lib.stdheader.20.default.htmlSpecialChars = 0

Try this one :-
For headers :
lib.stdheader.10.setCurrent.htmlSpecialChars >
For subHeaders :
lib.stdheader.20.setCurrent.htmlSpecialChars >

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

Imagemagick/Graphicsmagick commands in fluid image viewhelper?

Is it possible to get f:image or v:media.image or a similar available viewhelper to perform some classic TYPO3 imagemagick stunts, like converting an image to grayscale?
Like
10 = IMAGE
10.file.params = -type Grayscale
Or would I have to extend f:image with an own VH?
And If I'd have to do that: I guess it would be the right approach to just pass on these params to IM/GM, right? Where would I have to look to see how that's correctly done?
See this closed issue https://forge.typo3.org/issues/41347,
this feature has existing patch, but was abandoned (see Christian Kuhn comment why -> https://review.typo3.org/#/c/21162/), so now you need an own VH.
Edit:
If you want to have special effects on images you can use CSS property today, just use simple CSS Filters, with pretty nice browsers support today http://caniuse.com/#feat=css-filters
Examples:
http://www.cssreflex.com/css-generators/filter/
https://css-tricks.com/almanac/properties/f/filter/
I use TypoScript to configure images and call them in fluid:
<f:cObject typoscriptObjectPath="lib.fluidResponsiveImages" data="{image.uid}"></f:cObject>
TypoScript example:
#
# TypoScript Setup: lib.fluidResponsiveImages
# Load after tt_content.t3s
#
lib.fluidResponsiveImages = IMAGE
lib.fluidResponsiveImages {
file {
import.current = 1
treatIdAsReference = 1
width = 932
}
sourceCollection < tt_content.image.20.1.sourceCollection
layoutKey < tt_content.image.20.1.layoutKey
layout < tt_content.image.20.1.layout
params < tt_content.image.20.1.params
}

TYPO3 V7.6, default value for Number of Columns

How is it possible to set in Page TSConfig the default value for "Number of Columns" in TYPO3 V7.6? In erlier versions it was possible with TCEFORM.tt_content.imagecols = 1. If I set in V7.6 TCEFORM.tt_content.imagecols = 1 it makes no different which value is set. There is always imagecols = 2 set.
I have PHP 7.0.7 and use the rendering extension fluid_styled_content (not css_styled_content). Is there something I am missing?
Thanks in advance for your help.
TCAdefaults.tt_content.imagecols = 1
works for me in TYPO3 7.6.11
TCEFORM.tt_content.imagecols.config.default = 1 is not working, as described op.
Be aware: This config never works if you switch content type after saving a content:
https://forge.typo3.org/issues/75233

Disable spam protection when generating an Email in Fluid

I have enabled config.spamProtectEmailAddresses = -4 for my Typo3-site.
In a fluid template (that is used for generating the HTML of an email generated by the extension powermail), how can I override this setting to not protect the email adress here?
I have tried (see parseFunc)
<f:format.html parseFuncTSPath="lib.parseFunc_email">{text}</f:format.html>
but I can't find out which TS-property needs to change.
Or is there a different way to achieve this?
The most simple way would be to generate the e-mail link yourself:
{linkText}
I changed the TS setting config.spamProtectEmailAddresses = -4 for specific pages:
config.spamProtectEmailAddresses = -4
[globalVar = _GET|tx_powermail_pi1|action = create]
config.spamProtectEmailAddresses = 0
[global]
(From https://forge.typo3.org/issues/72983)

typo3 extension two times on page, different setup?

I have written a Typo3 extension that I want to put 2 times on the same Typo3 page (actually in two parts defined through a templavoila template), but the two instances need different setups!
When I add content to the page through the "Page" module, I can add as many instances of my extension as I want. But in the "Template" module, there is only 1 configuration per page.
So my question is: what is the best way to have different typoscript setups for different instances of a single plugin on the same page?
Thanks for any hints!
If a configuration option is not available as flexform, or there are other reasons why to change the options via TypoScript, you may do it like this:
temp.tx_yourextension < plugin.tx_yourextension
plugin.tx_yourextension >
plugin.tx_yourextension = CASE
plugin.tx_yourextension {
# check for the uid of the content element (the plugin)
key.field = uid
# if nothing special is defined
default < temp.tx_yourextension
# the plugin with the uid 1234 needs different configuration
1234 < temp.tx_yourextension
1234 {
property = whatever
}
}
Instead of requesting the uid, you could check for section_frame or any other field.
But keep in mind, some extensions accessing directly the TypoScript via $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_yourextension.']['property'] which will prevent this option.
You could do the same on tt_content.list.*
# without tx_ prefix
temp.yourextension < tt_content.list.20.yourextension
tt_content.list.20.yourextension >
tt_content.list.20.yourextension = CASE
...
Why using template configuration? You could define some configurations for the frontend plugin itself (with flexforms), so every instance could be customized.
You can use the flexform to have different setups. Each flexform is stored in a separate database field.