[TYPO3-ttnews] [TYPO-3-ttnews] two loops with TS
Laurent Albertini
lalbertini at cross-systems.com
Tue Jan 20 16:17:51 CET 2009
Hi !
This snippet (http://support.typo3.org/snippets/c/34/ ) allows to
display the selected news on the FE-page. The news are selected from a
content "Insert Records". This method works well.
It produces the following HTML code :
<div id="content">
<div class="newslist">
<strong>
<a href="index.php?...">Manews2</a>
</strong>
<br />
bla bla<a href="index.php?...">[more]</a>
</div>
<div class="newslist">
<strong>
<a href="index.php?...">MaNews1</a>
</strong>
<br />
bla bla2<a href="index.php?i...">[more]</a>
</div>
</div>
Now I want to display something like this :
<div id="content">
<div class="newslist">
<strong>
<a href="index.php?...">Manews2</a>
</strong>
<br />
bla bla<a href="index.php?...">[more]</a>
</div>
<div class="newslist">
<strong>
<a href="index.php?...">MaNews1</a>
</strong>
<br />
bla bla2<a href="index.php?i...">[more]</a>
</div>
</div>
<!-- NEW -->
<div id="secondDiv">
<ul>
<li>
MaNews2 Title
</li>
<li>
MaNews1 Title
</li>
</ul>
</div>
So I tried to copy-paste the snippet (with an other name, and correct
modifications) but it displayed the same HTML code, it seems impossible
to loop a second time...
Could you help me ?
Thanks.
More information about the TYPO3-project-tt-news
mailing list