I've added a field called icons of type svg-icons and am able to select icons I've added without an issue. I am having trouble outputting them on the front end however. I get twig errors no matter what I try.
Have done {{ dump(entry.icons) }}
and get the following output where you can see 11 lines from the bottom the path and name of the select svg icon.
How do I output that to the template?
D:\path\to\craft\app\vendor\twig\twig\lib\Twig\Extension\Debug.php:56:
object(Craft\SvgIconsModel)[700]
protected 'classSuffix' => string 'Model' (length=5)
protected 'strictAttributes' => boolean true
private '_classHandle' (Craft\BaseModel) => null
private '_attributeConfigs' (Craft\BaseModel) =>
array (size=6)
'icon' =>
array (size=2)
'default' => null
'type' => string 'string' (length=6)
'sprite' =>
array (size=2)
'default' => null
'type' => string 'string' (length=6)
'type' =>
array (size=2)
'default' => null
'type' => string 'string' (length=6)
'resource' =>
array (size=2)
'default' => null
'type' => string 'string' (length=6)
'width' =>
array (size=9)
'maxLength' => int 11
'min' => float -2147483648
'max' => float 2147483647
'decimals' => int 0
'default' => null
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 11
'column' => string 'integer' (length=7)
'height' =>
array (size=9)
'maxLength' => int 11
'min' => float -2147483648
'max' => float 2147483647
'decimals' => int 0
'default' => null
'type' => string 'number' (length=6)
'unsigned' => boolean false
'length' => int 11
'column' => string 'integer' (length=7)
private '_attributes' (Craft\BaseModel) =>
array (size=3)
'icon' => string 'general\design.svg' (length=18)
'width' => float 512
'height' => float 512
private '_extraAttributeNames' (Craft\BaseModel) => null
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
{{ entry.icons.icon }}
?