tt_news模板不显示图像

时间:2013-04-15 08:34:34

标签: typo3 tt-news

我正在使用typo3和tt_news开发一个网页,我编辑了tt_news_template_v3,以便按我想要的方式显示新闻。我用这种方式编辑了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&aacute;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&aacute;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&aacute;s  <!--###LINK_ITEM###-->
                </p>    
            </section>
        </div>
    <!-- ###NEWS_2### end-->
<!-- ###CONTENT### end -->
    </div>
   

这是我的错别字:

###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 =  &nbsp
plugin.tt_news._LOCAL_LANG.es.noNewsToListMsg = &nbsp 
##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 = 
 }

但### NEWS_IMAGE ###不起作用,它呈现如下:

<img src="" width="" height="" border="0" alt="">

如果我使用单一视图新闻,它的作用,呈现此

<img src="uploads/pics/imagenew.png" width="120" height="120" border="0" alt="">

有人知道怎么解决吗?

提前致谢

2 个答案:

答案 0 :(得分:2)

我回答我自己的问题:

问题在于调整图像的大小,所以我安装了JB GD Resize扩展,现在它就像一个魅力

答案 1 :(得分:0)

我猜image.stdWrap.cObject = IMAGE不起作用 - 或import=uploads/pics/错误。那么,你为什么要使用GIBUILDER?没有必要(我猜)。

您的第一个配置

  image.file.maxW = 87
  image.file.maxH = 59 
  image.file.width  = 87c
  image.file.height = 59c

看起来正确 - 它应该工作。所以只需删除GIFBUILDER - 东西。我不希望image.stdWrap起作用。这取决于扩展,如果“图像”。是一个真正的IMAGE对象。通常不是!