Customizing jContent
You can customize jContent in the following ways. You can:
- Add your own custom content types
- Specify that custom content types show in the left navigation tree
- Create a preview for custom content types
Showing custom content types
jContent shows content with jmix:editorialContent
when browsing content. To make your content types visible in jContent, the types must inherit from jmix:editorialContent
.
Showing custom content types in the left tree
By default, only Content folders are displayed in the Browse Folder of the content tree. If you want your content types to also appear at that level, they need to inherit from jmix:visibleInContentTree
.
Providing custom preview for a specific content type
To improve the experience of your contributors, you can develop a content view specific to jContent, which will be used for the preview pane instead of the default view.
You need to name this view cm
. You can find examples of news and event components in our demo module:
- Sample news component
https://github.com/Jahia/dx-base-demo-core/blob/master/src/main/resources/jnt_news/html/news.cm.jsp - Sample event component
https://github.com/Jahia/dx-base-demo-core/blob/master/src/main/resources/jnt_event/html/event.cm.jsp
Including internal and external links in a custom preview
You can use internal and external links in the cm
views. However, you will need to open external links in a new tab or window using the _blank
or _parent
values for the target attribute of the link tag. External links are links that redirect to a different domain name.