奇怪的行为编辑tt_news模板

时间:2013-04-11 07:53:16

标签: typo3 typoscript tt-news typo3-4.5

我正在使用ttnews插件开发我的网页,我编辑了tt_news_v3_template.html,因此它显示了我主页面中的前3个新闻。我想用这种格式,所以我更新了### TEMPLATE_LIST3 ###。那就是新代码

    <!-- ###TEMPLATE_LIST3### begin
    This is the template for the list of news in the archive or news page or search
-->
<div class="news-list3-container">
###NEWS_CATEGORY_ROOTLINE###
    <!-- ###CONTENT### begin
          This is the part of the template substituted with the list of news:
    -->
        <!-- ###NEWS### begin -->
        <article class="box">
            <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>

            <p class="subtitle">###NEWS_SUBHEADER###</p>
            <p>###NEWS_CONTENT###</p>
            <p>###CATWRAP_B### ###TEXT_CAT### ###NEWS_CATEGORY### ###NEWS_CATEGORY_IMAGE### ###CATWRAP_E###</p>
            <p>
                <a href="#" class="button">Ver M&aacute;s</a>
            </p>
        </article>

        <!-- ###NEWS### end-->
        <!-- ###NEWS_1### begin -->

    <div class="row" style="margin-top:15px; display: inline-block; width:100%">

            <section class="box" style="width:49%; float:left">
                <h2><!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--></h2>
                <p class="subtitle">###NEWS_SUBHEADER###</p>
                <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>
                    <a href="#" class="button">Ver M&aacute;s</a>
                </p>    
            </section>

    <!-- ###NEWS_1### end-->
    <!-- ###NEWS_2### begin -->

            <section class="box" style="width:49%; float:left">
                <h2><!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--></h2>
                <p class="subtitle">###NEWS_SUBHEADER###</p>
                <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>
                    <a href="#" class="button">Ver M&aacute;s</a>
                </p>    
            </section>

    <!-- ###NEWS_2### end-->
<!-- ###CONTENT### end -->
    </div>
</div>
   

但是当我看到页面时,两个第一个新闻显示得很好,有我分配的div和标签,但最后一个新复制了第一个新的结构,而不是使用它自己。这是生成的代码

<div class="news-list3-container">


    <article class="box">
        <div class="image-border">
            <a href="#" class="image image-left">

                </a><a href="index.php?id=52&amp;tx_ttnews%5Btt_news%5D=13&amp;cHash=449d2b3903b9c25c182967aa9c3f3e17" title="Noticia 3"></a>


        </div>
        <h2><a href="index.php?id=52&amp;tx_ttnews%5Btt_news%5D=13&amp;cHash=449d2b3903b9c25c182967aa9c3f3e17" title="Noticia 3">Noticia 3</a></h2>

        <p class="subtitle"></p><p>subtitle noticia 3<span class="news-list-morelink"><a href="index.php?id=52&amp;tx_ttnews%5Btt_news%5D=13&amp;cHash=449d2b3903b9c25c182967aa9c3f3e17" title="Noticia 3">[Leer más]</a></span></p><p></p>
        <p>texto noticia 3</p>
        <p></p><div class="news-list-category"> Categoría: News  </div><p></p>
        <p>
            <a href="#" class="button">Ver Más</a>
        </p>
    </article>



    <div class="row" style="margin-top:15px; display: inline-block; width:100%">

            <section class="box" style="width:49%; float:left">
                <h2><a href="index.php?id=52&amp;tx_ttnews%5Btt_news%5D=11&amp;cHash=e5904ef7f7a76b00a2333b7054fa3684" title="dsadasdasd">dsadasdasd</a></h2>
                <p class="subtitle"></p><p>dasdasdasdas<span class="news-list-morelink"><a href="index.php?id=52&amp;tx_ttnews%5Btt_news%5D=11&amp;cHash=e5904ef7f7a76b00a2333b7054fa3684" title="dsadasdasd">[Leer más]</a></span></p><p></p>
                <div class="image-border">
                    <a href="#" class="image image-full">
                        </a><a href="index.php?id=52&amp;tx_ttnews%5Btt_news%5D=11&amp;cHash=e5904ef7f7a76b00a2333b7054fa3684" title="dsadasdasd"></a>

                </div>
                <p><span style="font-family: sans-serif; line-height: 17.265625px; background-color: rgb(249, 249, 249); ">Lorem ipsum ad his scripta blandit partiendo, eum fastidii accumsan euripidis in, eum liber hendrerit an. Qui ut wisi vocibus suscipiantur, quo dicit ridens inciderint id. Quo mundi lobortis reformidans eu, legimus senserit definiebas an eos. Eu sit tincidunt incorrupte definitionem, vis mutat affert percipit cu, eirmod consectetuer signiferumque eu per. In usu latine equidem dolores. Quo no falli viris intellegam, ut fugit veritus placerat per. Ius id vidit volumus mandamus, vide veritus democritum te nec, ei eos debet libris consulatu. No mei ferri graeco dicunt, ad cum veri accommodare. Sed at malis omnesque delicata, usu et iusto zzril meliore. Dicunt maiorum eloquentiam cum cu, sit summo dolor essent te. Ne quodsi nusquam legendos has, ea dicit voluptua eloquentiam pro, ad sit quas qualisque. Eos vocibus deserunt quaestio ei. Blandit incorrupte quaerendum in quo, nibh impedit id vis, vel no nullam semper audiam. Ei populo graeci consulatu mei, has ea stet modus phaedrum. Inani oblique ne has, duo et veritus detraxit. Tota ludus oratio ea mel, offendit persequeris ei vim. Eos dicat oratio partem ut, id cum ignota senserit intellegat. Sit inani ubique graecis ad, quando graecis liberavisse et cum, dicit option eruditi at duo. Homero salutatus suscipiantur eum id, tamquam voluptaria expetendis ad sed, nobis feugiat similique usu ex. Eum hinc argumentum te, no sit percipit adversarium, ne qui feugiat persecuti. Odio omnes scripserit ad est, ut vidit lorem maiestatis his, putent mandamus gloriatur ne pro. Oratio iriure rationibus ne his, ad est corrumpit splendide. Ad duo appareat moderatius, ei falli tollit denique eos. Dicant evertitur mei in, ne his deserunt perpetua sententiae, ea sea omnes similique vituperatoribus. Ex mel errem intellegebat comprehensam, vel ad tantas antiopam delicatissimi, tota ferri affert eu nec. Legere expetenda pertinacia ne pro, et pro impetus persius assueverit. Ea mei nullam facete, omnis oratio offendit ius cu. Doming takimata repudiandae usu an, mei dicant takimata id, pri eleifend inimicus euripidis at. His vero singulis ea, quem euripidis abhorreant mei ut, et populo iriure vix. Usu ludus affert voluptaria ei, vix ea error definitiones, movet fastidii signiferumque in qui. Vis prodesset adolescens adipiscing te, usu mazim perfecto recteque at, assum putant erroribus mea in. Vel facete imperdiet id, cum an libris luptatum perfecto, vel fabellas inciderint ut. Veri facete debitis ea vis, ut eos oratio erroribus. Sint facete perfecto no vel, vim id omnium insolens. Vel dolores perfecto pertinacia ut, te mel meis ullum dicam, eos assum facilis corpora in. Mea te unum viderer dolores, nostrum detracto nec in, vis no partem definiebas constituam. Dicant utinam philosophia has cu, hendrerit prodesset at nam, eos an bonorum dissentiet. Has ad placerat intellegam consectetuer, no adipisci mandamus senserit pro, torquatos similique percipitur est ex. Pro ex putant deleniti repudiare, vel an aperiam sensibus suavitate. Ad vel epicurei convenire, ea soluta aliquid deserunt ius, pri in errem putant feugiat. Sed iusto nihil populo an, ex pro novum homero cotidieque. Te utamur civibus eleifend qui, nam ei brute doming concludaturque, modo aliquam facilisi nec no. Vidisse maiestatis constituam eu his, esse pertinacia intellegam ius cu. Eos ei odio veniam, eu sumo altera adipisci eam, mea audiam prodesset persequeris ea. Ad vitae dictas vituperata sed, eum posse labore postulant id. Te eligendi principes dignissim sit, te vel dicant officiis repudiandae. Id vel sensibus honestatis omittantur, vel cu nobis commune patrioque. In accusata definiebas qui, id tale malorum dolorem sed, solum clita phaedrum ne his. Eos mutat ullum forensibus ex, wisi perfecto urbanitas cu eam, no vis dicunt impetus. Assum novum in pri, vix an suavitate moderatius, id has reformidans referrentur. Elit inciderint omittantur duo ut, dicit democritum signiferumque eu est, ad suscipit delectus mandamus duo. An harum equidem maiestatis nec. At has veri feugait placerat, in semper offendit praesent his. Omnium impetus facilis sed at, ex viris tincidunt ius. Unum eirmod dignissim id quo. Sit te atomorum quaerendum neglegentur, his primis tamquam et. Eu quo quot veri alienum, ea eos nullam luptatum accusamus. Ea mel causae phaedrum reprimique, at vidisse dolores ocurreret nam.</span></p>
                <p></p><div class="news-list-category"> Categoría: News  </div><p></p>
                <p>
                    <a href="#" class="button">Ver Más</a>
                </p>    
            </section>


    <article class="box">
        <div class="image-border">
            <a href="#" class="image image-left">

                </a><a href="index.php?id=52&amp;tx_ttnews%5Btt_news%5D=6&amp;cHash=32f082d69ad6a8b17770e4af154b37f2" title="Noticia 2"></a>


        </div>
        <h2><a href="index.php?id=52&amp;tx_ttnews%5Btt_news%5D=6&amp;cHash=32f082d69ad6a8b17770e4af154b37f2" title="Noticia 2">Noticia 2</a></h2>

        <p class="subtitle"></p><p>subtitulo de la noticia 2<span class="news-list-morelink"><a href="index.php?id=52&amp;tx_ttnews%5Btt_news%5D=6&amp;cHash=32f082d69ad6a8b17770e4af154b37f2" title="Noticia 2">[Leer más]</a></span></p><p></p>
        <p>Contenido de la noticia 2</p>
        <p></p><div class="news-list-category"> Categoría: News, Blog  </div><p></p>
        <p>
            <a href="#" class="button">Ver Más</a>
        </p>
    </article>


    </div>
</div>

请注意,第3个新文章包含在文章class =“box”中,就像第一个新文章一样,而不是使用它自己的结构。我google了很多并检查标签,但我不知道如何解决它。有人可以给我一些建议或提示吗?

我正在使用typo3 4.5和tt_news 3.0.1

谢谢!

1 个答案:

答案 0 :(得分:1)

你必须设置

plugin.tt_news.alternatingLayouts = 3

在你的Typoscript安装程序中。 tt_news默认只使用2个交替的布局。