Re: [Jason] Showing content that meets certain criteria
Perfect! Thank you both, gentlemen!
I'd like to have the headings duplicated at the top with anchored links to the relevant section on the page. I've been able duplicate the headings at the top of the page -
http://www.wilmot.ca/links-websites.php - but I don't know how to create the anchored links.
This is the code that creates the line of headings at the top:
<?php $lastCategory = ''; ?>
<?php foreach ($community_linksRecords as $record): ?>
<?php if ($lastCategory != $record['category']): ?>
<?php echo $record['category:label'] ?>
<?php endif; ?>
<?php $lastCategory = $record['category']; ?>
<?php endforeach ?>
And this is the code - adapted from Tim - that displays the various sections beneath:
<?php $lastCategory = ''; ?>
<?php foreach ($community_linksRecords as $record): ?>
<?php if ($lastCategory != $record['category']): ?>
<h3 CLASS="h3RuleAbove"><?php echo $record['category:label'] ?></h3>
<?php endif; ?>
<p><strong><a href="<?php echo $record['content'] ?>" target="_blank"><?php echo $record['title'] ?></a></strong></p>
<?php $lastCategory = $record['category']; ?>
<?php endforeach ?>
Any suggestions, please?
Nigel Gordijk
Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net