Skip to content

Instantly share code, notes, and snippets.

@justrjlewis
Created July 11, 2014 18:22
Show Gist options
  • Save justrjlewis/6e9682d0b775d278f282 to your computer and use it in GitHub Desktop.
Save justrjlewis/6e9682d0b775d278f282 to your computer and use it in GitHub Desktop.
Concrete5 User List Filter
<h1><?php echo t('Filter');?></h1>
<ul class="reg-user-list-filter">
<?php
Loader::model('attribute/type');
Loader::model('attribute/categories/user');
$ak = UserAttributeKey::getByHandle('location');
$sa = new SelectAttributeTypeController(AttributeType::getByHandle('select'));
$sa->setAttributeKey($ak);
$values = $sa->getOptions();
foreach ($values as $v) {
?>
<li>
<a href="
<?php echo DIR_REL?>/<?php echo DISPATCHER_FILENAME?>?cID=<?php echo $c->getCollectionID()?>&keywords=<?php echo $v->value; ?>&submit=Submit
">
<?php echo $v->value; ?>
</a>
</li>
<?php
} // end value for each
?>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment