use of com.ganster.cms.core.pojo.Category in project Ganster-CMS by Gangster-trio.
the class CategoryController method show.
@RequestMapping("{id}")
public String show(@PathVariable("id") Integer id, Model model) {
ModelResult result = webService.getCategoryModel(id);
if (result == null) {
return "404";
}
// Add result to module
model.addAttribute("result", result);
Category category = (Category) result.get("category");
// If skin = null, set default skin
if (category.getCategorySkin() == null) {
category.setCategorySkin(CmsConst.DEFAULT_SKIN);
}
// Return to the site's skin view, for example : default-category
return category.getCategorySkin() + CmsConst.CATEGORY_SKIN_SUFFIX;
}
Aggregations