[英]tt_news template dont show images
I am developing a webpage with typo3 and tt_news, i edited the tt_news_template_v3 so the news appear in the way I want. 我正在使用typo3和tt_news开发一个网页,我编辑了tt_news_template_v3,以便新闻以我想要的方式显示。 I edited the TEMPLATE_LIST3 in this way: 我以这种方式编辑了TEMPLATE_LIST3:
<!-- ###TEMPLATE_LIST3### begin
This is the template for the list of news in the archive or news page or search
-->
###NEWS_CATEGORY_ROOTLINE###
<!-- ###CONTENT### begin
This is the part of the template substituted with the list of news:
-->
<!-- ###NEWS### begin -->
<article class="box">
<span class="news-list-date" style="margin-left:80%">###NEWS_DATE###</span>
<div class="image-border">
<a href="#" class="image image-left">
<!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
</a>
</div>
<h2><!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--></h2>
<h3 class="subtitulos">###NEWS_SUBHEADER###</h3>
<p>###NEWS_CONTENT###</p>
<!--<p>###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###</p>-->
<p class="button">
<!--###LINK_ITEM###--> Ver Más <!--###LINK_ITEM###-->
</p>
</article>
<!-- ###NEWS### end-->
<!-- ###NEWS_1### begin -->
<div class="row" style="margin-top:15px; display: inline-block; width:100%">
<div class="6u">
<section class="box tbox">
<h2><!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--></h2>
<h3 class="subtitulos">###NEWS_SUBHEADER###</h3>
<div class="image-border">
<a href="#" class="image image-full">
<!--###LINK_ITEM###-->###NEWS_IMAGE###<!--###LINK_ITEM###-->
</a>
</div>
<p>###NEWS_CONTENT###</p>
<!--<p>###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###</p>-->
<p class="button">
<!--###LINK_ITEM###--> Ver Más <!--###LINK_ITEM###-->
</p>
</section>
</div>
<!-- ###NEWS_1### end-->
<!-- ###NEWS_2### begin -->
<div class="6u">
<section class="box tbox">
<h2><!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--></h2>
<h3 class="subtitulos">###NEWS_SUBHEADER###</h3>
<div class="image-border">
<hr class="cl-right" />
###NEWS_IMAGE###
</div>
<p>###NEWS_CONTENT###</p>
<!--<p>###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###</p>-->
<p class="button">
<!--###LINK_ITEM###--> Ver Más <!--###LINK_ITEM###-->
</p>
</section>
</div>
<!-- ###NEWS_2### end-->
<!-- ###CONTENT### end -->
</div>
this is my typoscript: 这是我的打字稿:
###tt_news
plugin.tt_news.pageBrowser {
maxPages = 10
showPBrowserText = 0
showResultCount = 0
showFirstLast = 0
browseBoxWrap.wrap = ds|end
dontLinkActivePage = 1
pagefloat = right
showRange = 0
disabledLinkWrap = <li>|</li>
inactiveLinkWrap = <li>|</li>
activeLinkWrap = <li style="margin-right:5px;">|<li>
LinksWrap =
showResultsWrap = |
showResultsNumbersWrap =<li>|</li>
browseBoxWrap = <div style="text-align:center">
browseLinksWrap = |
}
plugin.tt_news.usePiBasePagebrowser = 1
#-----------------------------------# idioma e imagenes tt_news#-----------------------------------
plugin.tt_news {
displayList {
content_stdWrap.crop = 300 | ...
image.file.maxW = 87
image.file.maxH = 59
image.file.width = 87c
image.file.height = 59c
image.altText.field = imagecaption
image >
image.stdWrap.cObject = IMAGE
image.stdWrap.cObject.file = GIFBUILDER
image.stdWrap.cObject.file {
XY = 87,59
10 = IMAGE
10 {
offset = 0,0
file {
import=uploads/pics/
import.data = field:image
import.listNum = 0
import.override.field = image
maxW = 87
maxH = 59
width = 87c
height = 59c-0
}
}
}
}
_LOCAL_LANG.default {
pi_list_browseresults_first = Primera página
pi_list_browseresults_last = Última página
pi_list_browseresults_page = Página
pi_list_browseresults_prev = < Anterior
pi_list_browseresults_next = Siguiente >
}
}
plugin.tt_news.newsFiles.stdWrap.HTMLparser.tags.img.fixAttrib.width.set = 16
plugin.tt_news.newsFiles.stdWrap.HTMLparser.tags.img.fixAttrib.height.set = 18
#page.includeCSS {
#file1 = fileadmin/templates/webuax/css/uax.css
#file1.media = screen
#}
plugin.tt_news.enableConfigValidation = 0
## Hide the "no news id given" & "no news in this list
## messages, they might scare people
plugin.tt_news._LOCAL_LANG.es.noNewsIdMsg =  
plugin.tt_news._LOCAL_LANG.es.noNewsToListMsg =  
##para que coja los 3 layouts de noticias de la portada
plugin.tt_news.alternatingLayouts = 3
plugin.tt_news._LOCAL_LANG.es {
more =
}
plugin.tt_news._LOCAL_LANG.en {
more =
}
but the ###NEWS_IMAGE### dont work, it renders like this: 但是### NEWS_IMAGE ###不起作用,它呈现为:
<img src="" width="" height="" border="0" alt="">
If I use the single view news, its works, rendering this 如果我使用单一视图新闻,则其工作原理将呈现此
<img src="uploads/pics/imagenew.png" width="120" height="120" border="0" alt="">
Anybody knows how to solve it? 有人知道如何解决吗?
thanks in advance 提前致谢
I answer my own question: 我回答我自己的问题:
The problem was in the resizing of the images, so I installed the JB GD Resize extension, and now it works like a charm 问题在于图像的大小调整,因此我安装了JB GD Resize扩展,现在它像一个魅力一样工作
I guess image.stdWrap.cObject = IMAGE
does not work - or import=uploads/pics/
is wrong. 我猜image.stdWrap.cObject = IMAGE
不起作用-或import=uploads/pics/
是错误的。 So, why do you want to use GIBUILDER? 那么,为什么要使用GIBUILDER? There is no need to (i guess). 没有必要(我猜)。
Your first configuration 您的第一个配置
image.file.maxW = 87
image.file.maxH = 59
image.file.width = 87c
image.file.height = 59c
looks correct - it should work. 看起来正确-应该可以。 So just remove the GIFBUILDER
-stuff. 因此,只需删除GIFBUILDER
材料。 I would not expect image.stdWrap
to work. 我不希望image.stdWrap
工作。 It depends on the extension, if "image." 它取决于扩展名,如果是“ image”。 is a real IMAGE
object. 是真正的IMAGE
对象。 Often it is not! 通常不是!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.