HI @manikanthar1295 if you want to read page properties you have to inject the page, with that you can able to read page properties. And if you want to read inherited properties you have to use HierarchyNodeInheritanceValueMap.
Here is the piece of code.
@Model(adaptables = {SlingHttpServletRequest.
class,
Resource.
class}, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class TitleModel {
private String showDynamicMediaImage;
@Inject
private Page
currentPage;
@PostConstruct
public void init() {
final HierarchyNodeInheritanceValueMap inheritanceMap = new HierarchyNodeInheritanceValueMap(currentPage.getContentResource());
showDynamicMediaImage = Objects.nonNull(currentPage.getProperties().get("showDynamicMediaImage", String.class))
? inheritanceMap.getInherited("showDynamicMediaImage", String.class)
: FALSE;
}
}