By quixote on
Hi gang, I hope someone can help me with this. I'm about to go nuts trying to figure it out.
First of all, I'm using Drupal 5.1 and phptemplate. That said, I want to display my secondary links in two even columns. I can't figure out what value to print to make it happen.
Here's the code I have so far (located in page.tpl.php):
if (is_array($secondary_links)) :
$count = count($secondary_links);
$split = $count/2;
for($cnt = 1; $cnt < $count +1;) {
print $secondary_links[$cnt]; // This line is the bugger for me!
echo '<br>';
if($cnt == $split) {
echo '</td><td id="schools" width=50%>';
}
$cnt++;
}
endif;
As you can see, I'm able to get the quantity of links, and using the halfway point to insert new TD tags to make the second column. But everything I've tried either gives me an empty field or "Array". I've been all over the forums, to no avail. The split works because the extra tags appear in the generated source. What am I missing? I feel like I'm really close...
Comments
bump
I'm gonna bump this up 'cos the forums are especially active today. :)
Any help here is very much appreciated!