簡體   English   中英

tt_news模板不顯示圖像

[英]tt_news template dont show images

我正在使用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="">

有人知道如何解決嗎?

提前致謝

我回答我自己的問題:

問題在於圖像的大小調整,因此我安裝了JB GD Resize擴展,現在它像一個魅力一樣工作

我猜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”。 是真正的IMAGE對象。 通常不是!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM