1

我正在开发一个带有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="">

有人知道如何解决吗?

提前致谢

4

2 回答 2

2

我回答我自己的问题:

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

于 2013-04-16T09:08:22.057 回答
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-stuff。我不希望image.stdWrap工作。这取决于扩展名,如果是“图像”。是一个真实的IMAGE对象。通常不是!

于 2013-04-15T10:24:16.927 回答