Hallo,
nutze: Typo3 6.2
Extensions: Powermail und News
Nun wollte ich ein Formular generieren, welches als Thema aus Auswahlfeld nutzt,
in diesem Auswahlfeld sollen die Daten / Tag aus der News Extension angezeigt
werden.
Schritt 1:
- lib ausgedacht: lib.newsCategory
Schritt 2:
- Powermail -> Seite angelegt -> Formular angelegt -> Feld Thema angelegt als Typ
"Auswahlfeld"
- In das Feld unter (Erweitert) unter "Aus TypoScript generieren (z.B.
lib.fieldvalues)" eingetragen: lib.newsCategory
[FRAGE 1: Ich denke hier ist kein viewhelper notwendige oder?]
Schritt 3:
- Typoscriptdatei extern erstellt und eingebunden, die Datei hat folgendes
Script:
lib.newsCategory = COA_INT
lib.newsCategory {
plugin.tx_powermail{
settings {
setup {
prefill {
topic = CONTENT
topic {
table = tx_news_domain_model_tag
#Name der Tabelle in der Tag gespeichert sind.
select {
pidInList = 19
#ID in der die News/Nachrichten gespeichert werden
andWhere {
data = GP:title
#Name des Feldes in der Tabelle in der die Inhalte von Tag
gespeichert sind
wrap = tx_news_domain_model_tag.uid=|
}
}
renderObj = TEXT
renderObj.field = title
}
}
}
}
}
}
Im Frontent taucht im Auswahlfeld nun aber lediglich folgendes auf:
"<!--INT_SCRIPT.47ce8777ffc62d9420629e0e3b4ba7b8b-->"
Die Nummer ändern sich mit jeder aktualisierung.
Vor dem zuvor genannten Typoscript habe ich noch:
plugin.tx_powermail.settings.setup {
# Save values to any table (example for tt_adress)
dbEntry {
#####################################################
### EXAMPLE for adding values to table tt_address ###
#####################################################
# Enable or disable db entry for table tt_address
tx_news_domain_model_news._enable = TEXT
tx_news_domain_model_news._enable.value = 1
# Write only if any field is not yet filled with current
value (e.g. test if an email is already in database)
# default: always add new records (don't care
about existing values)
# update: update record if there is an existing
entry (e.g. if email is already there)
# none: no entry if field is filled (do nothing
if record already exists)
#tt_address._ifUnique.email = update
# Fill new record of table "tt_address" with field "email"
with a static value => mail (at) mail.com
#tt_address.email = TEXT
#tt_address.email.value = mail (at) mail.com
# Fill new record of table "tt_address" with field "pid"
with the current pid (e.g. 12)
tx_news_domain_model_news.pid = TEXT
tx_news_domain_model_news.pid.data = TSFE:id
# Fill new record of table "tt_address" with field
"tstamp" with the current time as timestamp (like 123456789)
tx_news_domain_model_news.tstamp = TEXT
tx_news_domain_model_news.tstamp.data = date:U
# Fill new record of table "tt_address" with field "address" with
the current formatted time (like "Date: 20.01.2013")
#tt_address.address = TEXT
#tt_address.address.data = date:U
#tt_address.address.strftime = Date: %d.%m.%Y
# Fill new record of table "tt_address" with field
"name" with the value from powermail {firstname}
tx_news_domain_model_news.title = TEXT
tx_news_domain_model_news.title.field = title
# Fill new record of table "tt_address" with field
"last_name" with the value from powermail {lastname}
tx_news_domain_model_news.teaser = TEXT
tx_news_domain_model_news.teaser.field = teaser
# Fill new record of table "tt_address" with field
"company" with the value from powermail {company}
tx_news_domain_model_news.bodytext = TEXT
tx_news_domain_model_news.bodytext.field = news
##############################################################
### EXAMPLE for adding values to table
tt_address_group_mm ###
### Add relation to an existing address group with uid
123 ###
##############################################################
# Enable or disable db entry for table
tt_address_group_mm
#tt_address_group_mm._enable = TEXT
#tt_address_group_mm._enable.value = 1
# Fill new record of table "tt_address_group_mm" with field
"uid_local" with uid of tt_address record that was just created before with
.field=uid_[tablename]
#tt_address_group_mm.uid_local = TEXT
#tt_address_group_mm.uid_local.field = uid_tt_address
# Fill new record of table "tt_address_group_mm" with field
"uid_foreign" with uid 123
#tt_address_group_mm.uid_foreign = TEXT
#tt_address_group_mm.uid_foreign.value = 123
}
}
Mit diesem Code werden Inhalte in die Datenbank von der News Extension
gespeichert.
Jemand eine Idee, wo mein Fehler liegt?
_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german