Hi Community!
A have an issue with a custom component i wanted to develop. 
This component displays a list of employees, which are stored using the data 
module. 
Now everything worked fine, I was able to show all the text based content, but 
when I tried to show an Image of the
Employee(which is stored in the DMS) I get the following error:
[code]
Expression stkfn is undefined on line 24, column 57 in 
giniality-website-employee/components/EmployeeOverview.ftl.
The problematic instruction:
----------
==> ${stkfn.getAsset(employee, 'portraitPhoto')} [on line 24, column 55 in 
giniality-website-employee/components/EmployeeOverview.ftl]
----------

Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression stkfn is undefined on 
line 24, column 57 in 
giniality-website-employee/components/EmployeeOverview.ftl.
        at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)
        at freemarker.core.TemplateObject.invalidTypeException(T
...
[/code]
When I understand this error correctly, the tag "stkfn" does not exist. The 
same Issue appears with "mgnl". But I use Magnolia Community Edition 4.5.2 with 
STK 2.0.3. Have you any Idea, what I am doing wrong?
Here my freemarker template, which causes the error:
[code]
[#list employees as employee]
        [#if employee.name?has_content]
        <div id="${employee.name!""}" class="slide">
                [#if employee.portraitPhoto?has_content ]
                    [#assign photo = "${stkfn.getAssetLink(employee, 
'portraitPhoto')}"]
                [/#if]
                [#if photo?has_content]
                        <img src="${photo}" class="employeeImage">
                [/#if]

                <div class="employee-teaser">
                        <h3>${employee.title!""} ${employee.givenName!""} 
${employee.familyName!""}</h3>
                        <p class="employee-roles">${employee.roles!""}</p>
                        <p class="employee-slogan">${employee.slogan!""}</p>
                </div>
        </div>
        [/#if]
[/#list]
[/code]

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=6af266ab-dd55-4e2e-8a22-926b2c591f10


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to