简体   繁体   中英

typo3 language menu with typoscript files not found

I try to add a language menu with typoscript, but the files I want to add as images ar not working.

my typoscript looks like this:

## Localization menu:
temp.langMenu = HMENU
    temp.langMenu.special = language
    temp.langMenu.special.value = 0,2
    temp.langMenu.1 = GMENU
    temp.langMenu.1.NO {
    XY = [5.w]+4, [5.h]+4
    backColor = white
    5 = IMAGE
    5.file = fileadmin/bilder/DE-flag-32.png || fileadmin/bilder/US-flag-32.png
    5.offset = 2,2
    }

    temp.langMenu.1.ACT < lib.langMenu.1.NO
    temp.langMenu.1.ACT = 1
    temp.langMenu.1.ACT.backColor = black

    temp.langMenu.1.USERDEF1 < lib.langMenu.1.NO
    temp.langMenu.1.USERDEF1 = 1
    temp.langMenu.1.USERDEF1.5.file = fileadmin/bilder/DE-flag-32.png || fileadmin/bilder/US-flag-32.png
    temp.langMenu.1.USERDEF1.noLink = 1

Cache is clean ...

result is this:

在此处输入图片说明

links are working but no image. in Site-source code the image got this path:

<img src="/typo3temp/menu/4baf3d2e70.gif" width="36" height="36" alt="Home">

Whats my Mistake in this case

I usually have a similar approach:

temp.language = HMENU
temp.language {
  special = language
  // 0 = Deutsch, 1 = Englisch
  special.value = 0,1
  wrap = <ul class="langmenu">|</ul>
  1 = GMENU
  1 {
    NO = 1
    NO {
      format = png
      // size of flag grafics
      XY = 38,17
      transparentColor = #00FFFF     
      backColor = #00FFFF      
      10 = IMAGE
      10.file = fileadmin/flags/de.png || fileadmin/flags/uk.png
      10.offset = 10,0
      10.file.width = 28
      10.file.height = 17

      wrap = <li>|</li>
    }
    ACT < .NO
    ACT {
      20 = IMAGE
      20.file = fileadmin/flags/arrow.gif
      20.format = png
      20.offset = 0,3
      noLink = 1
      wrap = <li class="act">|</li>
    }

    // if translation is not available:
    USERDEF1 < .NO
    USERDEF1 {
      // the grayscale effectdoes not work with some IM versions
      30 = EFFECT
      30.value = gray | gray=1 | grey | grey=1
      // the same flags like above, bleached
      40 = EFFECT
      40.value = gamma=5
      // naturally this should not be linked either
      noLink = 1
    }
  }
} 

differences which might be important:

  • I use constant values for the generated images and no blank after the comma
  • I give explicit sizes for the used images
  • I use color values instead of color names
  • I use transparent color

Image generation on the server (the install tool checks) is working in general? Pay special attention to the GDlib tests

install of imagemagick does the job

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM