Hallo,
ich versuche schon seit geraumer Zeit die Anzahl der einzufügenden Content Elemente zu beschränken und komme nicht dahinter.
Im Backend stelle ich den Redakteuren eine Menge von FCEs und ein Emailformular (formhandler) zur Verfügung. In weiterer Folge soll später vor dem Einfügen eines Content Elements plausibel geprüft werden ob dies überhaupt eingefügt werden darf, falls es nicht eingefügt werden darf, soll es erst gar nicht angezeigt werden WYSIWYG.
Dazu sieht mein User TSconfig wie folgt aus, es werden nur Tabs für FCEs und für das Emailformular angeboten:
# show tab-selection for content elements
templavoila.wizards.newContentElement.renderMode = tabs
# hide other tabs then fce-tab by deleting its contents
templavoila.wizards.newContentElement.wizardItems.common.show =
templavoila.wizards.newContentElement.wizardItems.special.show =
templavoila.wizards.newContentElement.wizardItems.forms.show =
templavoila.wizards.newContentElement.wizardItems.plugins.show =
# create custom tab with formhandler email form
templavoila.wizards.newContentElement.wizardItems.myGroup {
header = Email-Formular
elements {
emailForm {
icon = gfx/c_wiz/mailform.gif
title = Standard Email-Formular
description = Erstellen und Konfigurieren des Standard Email-Formular
tt_content_defValues {
CType = list
list_type = formhandler_pi1
}
}
test {
icon = gfx/c_wiz/user_defined.gif
title = test
description < emailformCounter
}
}
}
templavoila.wizards.newContentElement.wizardItems.myGroup.show = emailForm, test
Der ürsprüngliche Gedanke war ich könnte mit TypoScript und numRows eine Variable füllen, diese dann in einer Kondition abfragen und dem entsprechend die einzelnen Elemente anzeigen.
Im TypoScript habe ich hier schon mal ein 2tes Element (test.description < emailformCounter) eingefügt damit ich im Backend eine Art Debug-Ausgabe habe.
Leider bekomme ich weder das TypoScript richtig hin, noch eine entsprechende php-UserFunc zb:
includeLibs.myPhpInclude = fileadmin/private/php_user_funcs/DBhelpers.php
emailformCounter = USER
emailformCounter {
pidInList = 17001
ctype = list
list_type = formhandler_pi1
userFunc = user_DBhelpers->getElementCount
}
numRows zB:
emailformCounter = TEXT
emailformCounter.value {
numRows {
table = tt_content
#select.pidInList.data = field : uid
select.pidInList = 17001
}
}
Kann mir jemand einen Tip geben wie ich so was hinbekomme?
Danke!!!