Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

My OOTB component changes are showing in component.model.json but not in page.model.json

Avatar

Level 1

 

I have a navigation component which is core component. I've extended it by adding one pathfield for displaying logo. The logo changes are showing in navigation component's model.json but the changes are not in hompage's model.json


public interface ProfileModel extends Navigation {

public String getNavigationRoot();
public String getStructureStart();
public String getCollectAllPages();
public String getStructureDepth();
public String getDisableShadowing();
public String getId();
public String getEditLogo();

public String getArrowLogo();
}

public class ProfileModelImpl implements ProfileModel {
@ValueMapValue
private String navigationRoot;

@ValueMapValue
private String structureStart;

@ValueMapValue
private String collectAllPages;

@ValueMapValue
private String structureDepth;

@ValueMapValue
private String disableShadowing;

@ValueMapValue
private String id;

@ValueMapValue
private String editLogo;

@ValueMapValue
private String arrowLogo;

static final String RESOURCE_TYPE = "part/components/profile";


public String getNavigationRoot() {
return navigationRoot;
}

public String getStructureStart() {
return structureStart;
}

public String getCollectAllPages() {
return collectAllPages;
}

public String getStructureDepth() {
return structureDepth;
}

public String getDisableShadowing() {
return disableShadowing;
}

public String getId() {
return id;
}

public String getEditLogo() {
return editLogo;
}

public String getArrowLogo() {
return arrowLogo;
}

 

}

 

Im not able to see editLogo or arrowLogo in the json

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @baalaajira 

 

You need to use ComponentExporter as well in your model impl class. You can refer below document on how to extend core component, the right way

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/s...

 

Hope it helps!
Let me know

View solution in original post

2 Replies

Avatar

Community Advisor

@baalaajira Can you also post your annotations? You need to use componentexporter to your annotation to get the changes in page.model.json.

https://github.com/adobe/aem-core-wcm-components/blob/main/bundles/core/src/main/java/com/adobe/cq/w...

Avatar

Correct answer by
Community Advisor

Hi @baalaajira 

 

You need to use ComponentExporter as well in your model impl class. You can refer below document on how to extend core component, the right way

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/s...

 

Hope it helps!
Let me know