Skip to main content
added 28 characters in body
Source Link
mixerowsky
  • 1.6k
  • 13
  • 35

As I understand your question, I recommend you needto use for statement, you can do this:

<ul id="slideLinks">
<?php $slide_link = $node->field_slideshow_link['und']; ?>
<?php foreachfor ($slide_link$i as= $link0; $i < count($slide_link); ++$i): ?>
    <li><a class="slideControl" href="javascript:void(0);"><?php print $link['title'];render($slide_link[$i]['title']); ?></a></li>
<?php endforeach;endfor; ?>
</ul>

toThis will print all your titles...

As I understand you need this:

<ul id="slideLinks">
<?php $slide_link = $node->field_slideshow_link['und']; ?>
<?php foreach ($slide_link as $link) : ?>
    <li><a class="slideControl" href="javascript:void(0);"><?php print $link['title']; ?></a></li>
<?php endforeach; ?>
</ul>

to print all titles.

As I understand your question, I recommend you to use for statement, you can do this:

<ul id="slideLinks">
<?php $slide_link = $node->field_slideshow_link['und']; ?>
<?php for ($i = 0; $i < count($slide_link); ++$i): ?>
    <li><a class="slideControl" href="javascript:void(0);"><?php print render($slide_link[$i]['title']); ?></a></li>
<?php endfor; ?>
</ul>

This will print all your titles...

Source Link
mixerowsky
  • 1.6k
  • 13
  • 35

As I understand you need this:

<ul id="slideLinks">
<?php $slide_link = $node->field_slideshow_link['und']; ?>
<?php foreach ($slide_link as $link) : ?>
    <li><a class="slideControl" href="javascript:void(0);"><?php print $link['title']; ?></a></li>
<?php endforeach; ?>
</ul>

to print all titles.