Hi,
I tried to extend CategoryCloudModel and added following method to get image
url.
[code]
public String getCategoryImagePath(){
try{
String categoryName = SelectorUtil.getSelector(0);
Content category = CategoryUtil.getCategoryNodeByName(categoryName);
String imagePath = STKUtil.getAsset(category, "icon",
"extras").getLink();
return imagePath;
} catch (Exception e) {
return null;
}
}
[/code]
Here I am getting [code]NullPointerException[/code] as
[code]STKUtil.getAsset(category, "icon", "extras")[/code] returns
[code]null[/code]
Can anyone please suggest how to get image if I have Content node of a category?
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=6893847a-092e-4e6c-a45d-99437b7a5c45
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------