微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

页面中带有第一张图片的“包含摘要的选定页面的子页面菜单”

如何解决页面中带有第一张图片的“包含摘要的选定页面的子页面菜单”

|| 当前状态 在一个站点上,我当前正在使用
Sitemap
元素的
Menu of subpages of selected pages including abstracts
变体来创建子页面列表:   分页1   第1页的摘要      分页2   第2页的摘要      … 这一切都很好-可以通过TypoScript轻松完成:
lib.somethingsomething = COA
lib.somethingsomething {
    ...
    30 < tt_content.menu.20.4
    ...
}
期望状态 我想要的是摘要,其中包括页面中的图像(最好是页面中第一个“ 3”表示的第一个图像)。像这样:   分页1   [IMG-X]第1页的摘要      分页2   [IMG-Y]第2页的摘要      … 到目前为止,我发现的是Typo3 MailArchive上带有图像的线程子页面。但是,我没有它们使用的“ 4”扩展名。但是,我可以看到
tt_content.menu.20.4
只是
HMENU
,类型为
directory
TMENU
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等等?     

解决方法

这是典型的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
}
cu 罗曼     

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。