Hi Jan,
If I am not mistaken the code you refer to is implemented in the ContactModel
model class? The getPhoto method uses the deprecated TemplatingFunctions#Link
method and as far as I can see has no support for STK assets?
How do you use assets with arbitrary images from the data module?
>From the ContactModel class:
[code] /**
* FIXME: should be done better (binaryHandling): SCRUM-525.
*/
public String getPhoto() {
if (contact == null) {
return null;
}
Property binaryData = null;
try {
if (contact.hasNode("photo")) {
Node binaryNode = contact.getNode("photo");
binaryData = binaryNode.getProperty("jcr:data");
}
} catch (RepositoryException e) {
throw new RuntimeException(e);
}
if(binaryData != null){
return templatingFunctions.link(binaryData);
} else {
return null;
}
}[/code]
cheers,
Edgar
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=6b964c19-cb5a-4e77-8a74-7e034559a3d6
----------------------------------------------------------------
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]>
----------------------------------------------------------------