[TYPO3-german] import.ifEmpty oder wie

JoH info at cybercraft.de
Thu Sep 14 15:57:28 CEST 2006


> Das ifEmpty macht leider nichts, was ist das Problem?
> Ausschnitt aus einem COA:
>
> 5 = IMAGE
> 5 {
> file {
> import = uploads/tx_srfeuserregister/
> import.field = image
> import.listNum = 0
> import.ifEmpty = fileadmin/templates/images/keinbild.gif
> width = 130m
> height = 150m
> }
> }

Das macht deswegen nichts, weil import nie "empty" ist.
Es steht nämlich immer mindestens "uploads/tx_srfeuserregister/" drin.

Mach's einfach umgekehrt und nimm "keinbild" als default, der bei Bedarf
überschrieben wird. Ungefähr so:

5 = IMAGE
5 {
    file {
        import = fileadmin/templates/images/keinbild.gif
        import.override {
            field = image
            listNum = 0
            wrap = uploads/tx_srfeuserregister/|
        }
        width = 130m
        height = 150m
    }
}

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com





More information about the TYPO3-german mailing list