I am beginner to Hippo. I am using Hippo CMS 10.2.0 Community Edition. I have created new compound type in CMS. i.e. Custom Compound Type. I have used it in one existing document. Now I want to know that how should I render it the template of the existing document, in which i have used this compound type. I have written bean class for this compound type, but don't know how to render this compound type.
I am posting code for compound type bean here. I have created Profile Compound type which includes image, Title(String), Designation(String), Description(text) fields in it.
package org.example.beans;
import org.onehippo.cms7.essentials.dashboard.annotations.HippoEssentialsGenerated;
import org.hippoecm.hst.content.beans.Node;
import org.hippoecm.hst.content.beans.standard.HippoCompound;
@HippoEssentialsGenerated(internalName = "gogreen:gogreen_profile")
@Node(jcrType = "gogreen:Profile")
public class Profile extends HippoCompound {
@HippoEssentialsGenerated(internalName = "gogreen:string")
public String getString() {
return getProperty("gogreen:string");
}
@HippoEssentialsGenerated(internalName = "gogreen:string_")
public String getString_() {
return getProperty("gogreen:string_");
}
@HippoEssentialsGenerated(internalName = "gogreen:text")
public String getText() {
return getProperty("gogreen:text");
}
@HippoEssentialsGenerated(internalName = "gogreen:image")
public Imageset getImage() {
return getLinkedBean("gogreen:image", Imageset.class);
}
}
can anyone suggest me whether this bean class is correct?,where should I place this bean class?, how should I use this methods in the template of the document in order to render this compound type fields.
Any help is appreciated.
Thanks in advance.