{% nav program in craft.entries.section('program').level(1) %}
{% set active = entry is defined and program.isAncestorOf(entry) %}
<div class="col-sm-4 class="{% if active %}active{% endif %}">
{% if program.featureImage|length %}
<img src="{{ program.featureImage.first().url }}" alt="{{ program }}">
{% endif %}
<h3 class="centered" href="{{ program.url }}">{{ program.title }}</h3>
<p>{{ program.description }}</p>
</div>
{% endnav %}
The follow is dump(program.featureImage)
/Users/blah/Sites/blah-site/craft/app/vendor/twig/twig/lib/Twig/Extension/Debug.php:56:
object(Craft\ElementCriteriaModel)[182]
protected 'strictAttributes' => boolean false
private '_elementType' =>
object(Craft\AssetElementType)[176]
protected 'componentType' => string 'ElementType' (length=11)
private '_sourcesByContext' (Craft\BaseElementType) => null
private '_classHandle' (Craft\BaseComponentType) => null
public 'behaviors' =>
array (size=0)
empty
private '_initialized' (CApplicationComponent) => boolean true
private '_e' (CComponent) => null
private '_m' (CComponent) => null
private '_supportedFieldHandles' => null
private '_matchedElements' => null
private '_matchedElementsAtOffsets' => null
private '_cachedIds' => null
private '_cachedTotal' => null
protected 'classSuffix' => string 'Model' (length=5)
private '_classHandle' (Craft\BaseModel) => null
private '_attributeConfigs' (Craft\BaseModel) =>
array (size=44)
'ancestorDist' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'ancestorOf' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'archived' =>
array (size=8)
'maxLength' => int 1
'default' => boolean false
'required' => boolean true
'column' => string 'tinyint' (length=7)
'unsigned' => boolean true
'type' => string 'bool' (length=4)
'min' => int 0
'max' => int 255
'dateCreated' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'dateUpdated' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'descendantDist' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'descendantOf' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'fixedOrder' =>
array (size=8)
'maxLength' => int 1
'default' => boolean false
'required' => boolean true
'column' => string 'tinyint' (length=7)
'unsigned' => boolean true
'type' => string 'bool' (length=4)
'min' => int 0
'max' => int 255
'id' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'indexBy' =>
array (size=1)
'type' => string 'string' (length=6)
'level' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'limit' =>
array (size=9)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'default' => int 100
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'locale' =>
array (size=2)
'column' => string 'locale' (length=6)
'type' => string 'locale' (length=6)
'localeEnabled' =>
array (size=8)
'maxLength' => int 1
'default' => boolean true
'required' => boolean true
'column' => string 'tinyint' (length=7)
'unsigned' => boolean true
'type' => string 'bool' (length=4)
'min' => int 0
'max' => int 255
'nextSiblingOf' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'offset' =>
array (size=9)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'default' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'order' =>
array (size=2)
'default' => string 'title asc' (length=9)
'type' => string 'string' (length=6)
'positionedAfter' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'positionedBefore' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'prevSiblingOf' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'relatedTo' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'ref' =>
array (size=1)
'type' => string 'string' (length=6)
'search' =>
array (size=1)
'type' => string 'string' (length=6)
'siblingOf' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'slug' =>
array (size=1)
'type' => string 'string' (length=6)
'status' =>
array (size=2)
'default' => string 'enabled' (length=7)
'type' => string 'string' (length=6)
'title' =>
array (size=1)
'type' => string 'string' (length=6)
'uri' =>
array (size=1)
'type' => string 'string' (length=6)
'with' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'childField' =>
array (size=1)
'type' => string 'string' (length=6)
'childOf' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'depth' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'parentField' =>
array (size=1)
'type' => string 'string' (length=6)
'parentOf' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'filename' =>
array (size=1)
'type' => string 'string' (length=6)
'folderId' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'height' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'includeSubfolders' =>
array (size=8)
'maxLength' => int 1
'default' => boolean false
'required' => boolean true
'column' => string 'tinyint' (length=7)
'unsigned' => boolean true
'type' => string 'bool' (length=4)
'min' => int 0
'max' => int 255
'kind' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
'size' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'source' =>
array (size=4)
'maxLength' => int 255
'reservedWords' => string 'id,dateCreated,dateUpdated,uid,title' (length=36)
'column' => string 'varchar' (length=7)
'type' => string 'handle' (length=6)
'sourceId' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'width' =>
array (size=8)
'maxLength' => int 11
'min' => int -2147483648
'max' => int 2147483647
'decimals' => int 0
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 10
'column' => string 'integer' (length=7)
'withTransforms' =>
array (size=3)
'model' => null
'column' => string 'text' (length=4)
'type' => string 'mixed' (length=5)
private '_attributes' (Craft\BaseModel) =>
array (size=10)
'archived' => boolean false
'fixedOrder' => boolean false
'limit' => string '1' (length=1)
'localeEnabled' => boolean true
'offset' => int 0
'order' => string 'sources1.sortOrder' (length=18)
'status' => string 'enabled' (length=7)
'includeSubfolders' => boolean false
'locale' => string 'en_us' (length=5)
'relatedTo' =>
array (size=3)
'sourceElement' => string '8' (length=1)
'sourceLocale' => string 'en_us' (length=5)
'field' => string '5' (length=1)
private '_extraAttributeNames' (Craft\BaseModel) =>
array (size=0)
empty
private '_errors' (CModel) =>
array (size=0)
empty
private '_validators' (CModel) => null
private '_scenario' (CModel) => string '' (length=0)
private '_e' (CComponent) => null
private '_m' (CComponent) => null