[TYPO3-german] Standard Bild-Element wird nicht ausgegeben, wenn HTML-Ausgabe für andere Layouts umgeschrieben wird
JCL - Johannes C. Laxander
jc at laxander.com
Thu Oct 16 16:12:17 CEST 2014
GELÖST!
Hier hab' ich die Lösung gefunden: http://www.fassing.eu/loesungen/typo3/ce-layout-switch/.
Danke an Claus Fassing! Nicht das ganze Image Object manipulieren sondern nur "tt_content.image.20". So funktionierts:
# CASE Object um 'image'
# Inhaltselement 'image' kopieren (sichern)
temp.image < tt_content.image.20
# 'image'-Element löschen
tt_content.image.20 >
# neu aufbauen als CASE-Objekt
tt_content.image.20 = CASE
tt_content.image.20 {
# Layouts auswählen
# default = Standard 'image'-Objekt
# 1 - Bild-Text-Banner
key.field = layout
# Gesicherte Standard-Konfiguration zurück kopieren
default < temp.image
# Bild-Text-Banner hat als Basis ebefalls die Standard-Konfiguration
1 < temp.image
# Page Image Teaser
2 < temp.image
}
tt_content.image.1 {
# Manipulationen
}
tt_content.image.2 {
# Manipulationen
}
# Da die Content Elemente "Bild" und "Text & Bild" zusammenhängen,
# muss für die Verwendung "Text & Bild" das Original tt_content.image.20 referenziert werden,
# da durch die Manipulation der Text nicht mehr gerendert wird.
tt_content.textpic.20 = < tt_content.image.20.default
Johannes.
> -----Ursprüngliche Nachricht-----
> Von: typo3-german-bounces at lists.typo3.org
> [mailto:typo3-german-bounces at lists.typo3.org] Im Auftrag von
> JCL - Johannes C. Laxander
> Gesendet: Donnerstag, 16. Oktober 2014 10:08
> An: 'German TYPO3 Userlist'
> Betreff: Re: [TYPO3-german]Standard Bild-Element wird nicht
> ausgegeben, wenn HTML-Ausgabe für andere Layouts umgeschrieben wird
>
>
> Die Fehlermeldung in der Frontendausgabe ist mit dem Patch
> behoben (siehe mein vorhergehendes Posting). Das TYPO3
> Standard Inhaltselment "Image" wird aber immer noch nicht ausgegeben.
>
> Woher soll TYPO3 denn jetzt wissen, dass die Ausgabe aus dem
> Objeckt tt_content.image.default gerendert werden soll und
> nicht mehr aus tt_content.image???
>
> Da muss ich doch sicher noch was tun! Aber was?
>
> Johannes.
>
> >
> > ich möchte aufgrund der Layout-Auswahl im Inhaltselement die
> > HTML-Ausgabe ändern. Dafür habe ich dieses Typoscript (TYPO3 6.2.5):
> >
> > # CASE Object um 'image'
> > # Inhaltselement 'image' kopieren (sichern) temp.tt_content <
> > tt_content.image # 'image'-Element löschen tt_content.image > # neu
> > aufbauen als CASE-Objekt tt_content.image = CASE tt_content.image {
> > # Layouts auswählen
> > # default = Standard 'image'-Objekt
> > # 1 - Bild-Text-Banner
> > key.field = layout
> > # Gesicherte Standard-Konfiguration zurück kopieren
> > default < temp.tt_content
> > # Bild-Text-Banner
> > 1 < temp.tt_content
> > # Image Teaser
> > 2 < temp.tt_content
> > }
> >
> > Die neu definierten Objekte sind "eigene Inhaltselemente"
> und werden
> > wie gewünscht ausgegeben. Bei einem Standard Image
> Inhaltselement wird
> > aber dieser Fehler ausgegeben:
> >
> > #1: PHP Warning: array_replace_recursive() [<a
> > href='function.array-replace-recursive'>function.array-replace
> > -recursive</a>]: Argument #1 is not an array in ...
> >
> > Wo liegt mein Fehler? Ich vermute es liegt an "default <
> > temp.tt_content" !? Aber wie geht’s richtig?
> >
> > Gruß, Johannes.
> >
> >
> >
> > _______________________________________________
> > TYPO3-german mailing list
> > TYPO3-german at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
> >
>
> _______________________________________________
> TYPO3-german mailing list
> TYPO3-german at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german
>
More information about the TYPO3-german
mailing list