“选定页面的子页面菜单,包括摘要”,第一张图片来自页面

时间:2011-05-26 05:55:08

标签: typo3 typoscript

当前状态

在网站上,我目前正在使用Menu of subpages of selected pages including abstracts元素的Sitemap变体来创建子页面列表:

  

子网页1
  摘自第1页

     

子页面2
  摘自第2页

     

...

这一切都非常好 - 通过TypoScript很容易做到:

lib.somethingsomething = COA
lib.somethingsomething {
    ...
    30 < tt_content.menu.20.4
    ...
}

期望状态

我想要的是从页面中包含图像的摘要(最好是页面上第一个tt_content的第一个图像)。像这样:

  

子网页1
  [IMG-X]摘自第1页

     

子页面2
  [IMG-Y]摘自第2页

     

...

到目前为止,我发现的是 Typo3 MailArchive 上的帖子subpages with image。但是,我没有使用DAM扩展名。但是,我可以看到tt_content.menu.20.4只是HMENU TMENU类型directory

tt_content.menu.20.4 = HMENU # "Menu of subpages to these pages (with abstract)"
tt_content.menu.20.4 {
    1 = TMENU
    1 {
        target = 
        NO {
            stdWrap.htmlSpecialChars = 1
            ATagTitle.field = description // title
            linkWrap = <dt>|</dt>
            after {
                data = field : abstract // field : descr...
                required = 1
                htmlSpecialChars = 1
                wrap = <dd>|</dd>
            }
        }
        noBlur = 1
    }
    special = directory
    special.value.field = pages
    wrap = <dl class="csc-menu csc-menu-4">|</dl>
}

有没有人知道如何实现这一目标,无论是扩展,TS等等?

1 个答案:

答案 0 :(得分:0)

这是一个典型的Typo3预告片,用于加载要显示的当前页面的第一张图像。你肯定可以使用与导航元素类似的东西。

lib.teaser = IMAGE
lib.teaser {
  #this is the default image, for pages with no specific image add
  file = fileadmin/template/gfx/test_header1.jpg

  #if the selected page has an added image, the set this instead of the default above
  file.import.override.field = media

  #fetch image from the upload/media/ folder
  file.import.data = levelmedia: -1, "slide"
  file.import = uploads/media/

  #lock the configuration to use only the first added image
  file.import.listNum = 0
}

铜 罗马

相关问题