TYPO3 backend user right for columns - typo3

I would like to assign BE User rights to specific columns in BE Layout (Field colPos): A usergroup shall not be able to edit one column.
Any ideas?

use condition in page tsconfig:
[usergroup = 2]
mod {
web_layout {
BackendLayouts {
standard {
config {
backend_layout {
rows {
1 {
columns {
1 {
colPos =
}
}
}
}
}
}
}
}
}
}
[global]

Related

How do I override HMENU Special setting based on layout?

I have a menu element that is set to list the selected pages.
tt_content.my_menu {
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
10 {
special = list
special.value.field = pages
}
}
}
How can I change this to a directory of pages when a specific layout is set?
tt_content.my_menu {
dataProcessing {
10 {
special {
override = directory
override.if.value = my-layout
override.if.equals.field = layout
}
}
}
}
I'm not sure if MenuProcessor? has stdWrap on its properties.
But it should be possible to define two processors, each with an if:
tt_content.my_menu {
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
10 {
if {
value = my-layout
equals.field = layout
negate = 1
}
special = list
special.value.field = pages
}
20 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
20 {
if {
value = my-layout
equals.field = layout
}
special = directory
special.value.field = pages
}
}
}

Set levels property for menu_subpages depdending on layout

I have the following typoscript configuration for the menu_subpages object:
tt_content.menu_subpages {
dataProcessing {
10 {
levels = 1
as = menu
expandAll = 1
includeSpacer = 1
}
}
}
To give the editor more flexibility I want to set the levels property depending on the selected layout of the content object. I've tried to use the CASE object but this doesn't seem to work:
tt_content.menu_subpages {
dataProcessing {
10 {
levels = CASE
levels {
key.field = layout
default = TEXT
default.value = 1
1000 = TEXT
1000.value = 7
}
...
}
}
}
Thanks for any help!
As levels is no object but a property you can't use it as an object.
Either you change it to an object:
tt_content.menu_subpages {
dataProcessing {
10 {
levels.cObject = CASE
levels.cObject {
:
}
...
}
}
}
Or you need to set the value inside a typoscript condition.
tt_content.menu_subpages {
dataProcessing {
10 {
// default:
levels = 1
...
}
}
}
[page['layout'] == 1000]
tt_content.menu_subpages.dataProcessing.10.levels = 7
[page['layout'] = 2000]
tt_content.menu_subpages.dataProcessing.10.levels = 3
[global]

Detail page uid mandatory in Typo3 9.5 seo sitemap for own extension?

I am trying to set up my sitemap in Typo3 9.5 and it worked well for regular pages and news. For my own plugin, I don't want to specify a detail page because the list and detail pages are the same pages. I've tried setting url.pageId = 0 and mapping the pid of myobject to the id in fieldToParameterMap, but the line is ignored (mapping 'foo' works just fine, id is probably not allowed). How can i set the list page pid as the detail page pid?
plugin.tx_seo {
config {
xmlSitemap {
sitemaps {
pages {
provider = TYPO3\CMS\Seo\XmlSitemap\PagesXmlSitemapDataProvider
config {
additionalWhere = AND no_index = 0
}
}
myextension {
provider = TYPO3\CMS\Seo\XmlSitemap\RecordsXmlSitemapDataProvider
config {
table = tx_myextension_domain_model_myobject
sortField = objectname
lastModifiedField = tstamp
additionalWhere = AND (deleted = 0 AND hidden = 0)
pid = 1
recursive = 5
url {
pageId = /*** uid of detail view page expected ***/
fieldToParameterMap {
pid = id
uid = tx_myextension_display[myobject]
}
additionalGetParameters {
tx_myextension_display.controller = Mycontroller
tx_myextension_display.action = show
}
useCacheHash = 1
}
}
}
}
}
}
}
Kind regards,
Moritz

TYPO3 Formhandler Finisher_Mail multiple receivers with to_email + addTolist

I have a formhandler-form and I'm trying to find a good way to send an admin mail to multiple recipients with one mail finisher. The Problem is the recipients are variable. The recipients of the mail depends on the selection of 10 checkboxes in the form. Each selection should have the effect that a new recipient is added. At the moment it's solved with 10 mail finisher like
if {
1 {
conditions {
OR1.AND1 = checkbox_1 = 1
}
isTrue {
finishers.1.config.admin.to_email = p1#mail.com
}
else {
finishers.1.config.admin.disable = 1
}
}
2 {
conditions {
OR1.AND1 = checkbox_2 = 1
}
isTrue {
finishers.2.config.admin.to_email = p2#mail.com
}
else {
finishers.2.config.admin.disable = 1
}
}
...
Is there a better way? I tried to solve this with one finisher and the usage of addToList
if {
1 {
conditions {
OR1.AND1 = checkbox_1 = 1
}
isTrue {
finishers.1.config.admin.to_email := addToList(p1#mail.com)
}
}
2 {
conditions {
OR1.AND1 = checkbox_2 = 1
}
isTrue {
finishers.1.config.admin.to_email := addToList(p2#mail.com)
}
}
...
But it doesn't work. With 4 selected boxes it is still one recipient. Why?
don't forget: typoscript is a configuration language, no programming language.
so you need another logic to build up the multiple receivers.
something like:
:
finishers.1.config.admin.to_email = COA
finishers.1.config.admin.to_email {
10 = TEXT
10.value = p1#mail.com,
10.if.isTrue.data = checkBox_1
20 = TEXT
20.value = p2#mail.com,
20.if.isTrue.data = checkBox_2
30 = TEXT
30.value = p3#mail.com,
30.if.isTrue.data = checkBox_3
stdWrap.substring = 0,-1
}

Exception while property mapping at property path "": Property was not found in target object of type "In2code\Femanager\Domain\Model\User"

I try to extend the Extension femanager with a new Field, customernumber. I set up the TCA Definition and the Model for this Field. In Typoscript I set my Model and map it to fe_users.
config.tx_extbase{
persistence{
classes{
In2\Femanager\Domain\Model\User {
subclasses {
0 = FederhenSchneider\Extendfemanager\Domain\Model\User
}
}
FederhenSchneider\Extendfemanager\Domain\Model\User {
mapping {
tableName = fe_users
recordType = 0
}
}
}
}
objects {
In2\Femanager\Controller\NewController.className = FederhenSchneider\Extendfemanager\Controller\NewController
In2\Femanager\Controller\EditController.className = FederhenSchneider\Extendfemanager\Controller\EditController
In2\Femanager\Domain\Validator\ServersideValidator.className = FederhenSchneider\Extendfemanager\Domain\Validator\CustomServersideValidator
In2\Femanager\Domain\Validator\ClientsideValidator.className = FederhenSchneider\Extendfemanager\Domain\Validator\CustomClientsideValidator
}
}
plugin.tx_femanager {
view {
partialRootPaths {
10 = EXT:extendfemanager/Resources/Private/Partials/
}
}
}
In the Backend the Field is ok. When I send my Formular in the Frontend I get this Error:
Exception while property mapping at property path "": Property
"customernumber" was not found in target object of type
"In2code\Femanager\Domain\Model\User".
I don`t understand why he is looking in the Model from In2Code and not in my Model.
My System:
PHP 7.0
TYPO3 7.6.18
Femanager 2.6.0
Femanager 2.6.0 uses In2code\Femanager\Domain\Model\User (In2code instead of In2) as namespace.
Corrected Typoscript:
config.tx_extbase{
persistence{
classes{
In2code\Femanager\Domain\Model\User {
subclasses {
0 = FederhenSchneider\Extendfemanager\Domain\Model\User
}
}
FederhenSchneider\Extendfemanager\Domain\Model\User {
mapping {
tableName = fe_users
recordType = 0
}
}
}
}
objects {
In2code\Femanager\Controller\NewController.className = FederhenSchneider\Extendfemanager\Controller\NewController
In2code\Femanager\Controller\EditController.className = FederhenSchneider\Extendfemanager\Controller\EditController
In2code\Femanager\Domain\Validator\ServersideValidator.className = FederhenSchneider\Extendfemanager\Domain\Validator\CustomServersideValidator
In2code\Femanager\Domain\Validator\ClientsideValidator.className = FederhenSchneider\Extendfemanager\Domain\Validator\CustomClientsideValidator
}
}
plugin.tx_femanager {
view {
partialRootPaths {
10 = EXT:extendfemanager/Resources/Private/Partials/
}
}
}