Skip to content

Instantly share code, notes, and snippets.

@glideranderson
Created October 22, 2012 19:04
Show Gist options
  • Save glideranderson/3933408 to your computer and use it in GitHub Desktop.
Save glideranderson/3933408 to your computer and use it in GitHub Desktop.
Concrete5 Get attribute set by handle, loop thru attribute keys, output key name and key value
<?php $attr_set = AttributeSet::getByHandle('boat_model_info'); ?>
<?php $attr_keys = $attr_set->getAttributeKeys(); ?>
<?php foreach($attr_keys as $ak) { ?>
<li class="spec-name"><?= $ak->akName ?></li>
<li class="spec-value"><?= $c->getAttribute($ak->akHandle) ?></li>
<?php } ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment