[TYPO3-dev] tx_news - Zu viele "News" ausgegeben

Benjamin Beck beck at beck-digitale-medien.de
Mon Nov 24 10:21:30 CET 2014


Hello Dirk,

you did not close the li-tag with "</li>" but opened a new one (in "Item.html").
The closing tags you see are generated automatically by the dom-parser.

If you want to see the "real" sourcecode and not the one interpreted by the parser you
should open the "view sourcecode" view.

There you will see that the li tags are never closed.

Greetings
Benjamin

On 23.11.2014, at 20:50, Dirk Ho <dirk_studivz at web.de> wrote:

> Hallo zusammen,
> 
> ich habe das List/Item.html Partial und das List.html Template bei den tx_news überschrieben. In meiner unordered list habe ich jedoch nun nach jedem News-Eintrag ein leeres Listenelement. K.A., wo das her kommt.
> 
> Kann mir da bitte jemand weiterhelfen?
> 
> Hier mein List/Item.html Partial
> {namespace n=Tx_News_ViewHelpers}<!--
>  =====================
>    Partials/List/Item.html
> -->
> <f:switch expression="{settings.templateLayout}">
> 
>  <!--f:case value="1">News</f:case-->
> 
>  # TERMIN-LAYOUT
>  <f:case value="2">
>    <li>
>      <n:link newsItem="{newsItem}" settings="{settings}">
>        <n:format.date format="{f:translate(key:'dateFormat')}">{newsItem.datetime}</n:format.date> {newsItem.title}
>      </n:link>
>    <li>
>  </f:case>
> 
>  <f:case default="TRUE">
> <div class="...">...</div>
>  </f:case>
> </f:switch>
> 
> Hier mein List.html Template
> {namespace n=Tx_News_ViewHelpers}
> <f:layout name="General" />
> <!--
>  =====================
>    Templates/News/List.html
> -->
> 
> <f:section name="content">
>  <f:if condition="{news}">
>    <f:then>
>        # TERMIN-LAYOUT
>        <f:case value="2">
>          <ul id="termine">
>            <f:for each="{news}" as="newsItem" iteration="iterator">
>              <f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
>            </f:for>
>          </ul>
>        </f:case>
>        # DEFAULT LAYOUT
>        <f:case default="TRUE">
>        </f:case>
>      </f:switch>
>    </f:then>
>  </f:if>
> </f:section>
> 
> Die Ausgabe die ich im Firebug sehe ist folgende:
> <ul id="termine">
>  <li><a href="...">01.12.2014 Weihnachtsfeier</a></li>
>  <li></li>
>  <li><a href="...">22.12.2014 Nächstes Treffen</a></li>
>  <li></li>
>  <li><a href="...">31.12.2014 Silvesterfeier</a></li>
>  <li></li>
> </ul>
> 
> Vielen Dank und viele Grüße,
> 
> Dirk
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev




More information about the TYPO3-dev mailing list