Coda Clips

A TXP form to display authors within an unordered list

<txp:php>
// privileges are set here for all authors except for administrator (1) and managing editor (2)
$authors = safe_rows('Realname, privs', 'txp_users', 'privs > 2');
if ($authors > 1) {
echo '<h3>Our Authors:</h3>'."\r".'<ul>'."\r";
foreach($authors as $key => $value) {
$name = sanitizeForUrl($authors[$key][Realname]);
echo '<li><a href="'.hu.'authors/'.$name.'" title="About this author...">'.$authors[$key][Realname].'</a></li>';
}
echo '</ul>'."\r";
}
</txp:php>

Added to by Patrick Lefevre

Install Clip


Sponsored Links: