Is there any way to achieve that a component when is created stores a value in the content?
I need to store information when a page is created, and I need to store the static information in the same place where the component included in the page store its content.
For example a component called "includedcomponent" included in a page with
<cq:include path="includedcomponent" resourceType="/apps/myproject/components/includes/includedcomponent" />
I need when the page is created to create its resource node in jcr:content of the page, i.e. in "pagepath/jcr:content/includedcomponent" with a static information.
Check out /apps/geometrixx-media/templates/media-article-page in you local instance in CRXDE Lite. You can see that the template definition includes additional nodes under the jcr:content. Any of the nodes/content you include on or under jcr:content on a template definition are added to a page that is created with that template. This allows you to add components and default content at page creation time.
Thank you, this is a good way. But I would like to avoid to put the information out of the component. I would like to do everything inside of the component.
I have found this information:
But I cannot achieve it works with a component included in another Component..