Try now Demo en
  • en
  • fr
  • de
  • Product
    • Platform
      • Software TourFeatures & capabilities overview
      • Why eXoeXo Platform key differentiators
      • InternationalisationSupporting multilingual environments
      • MobileResponsive & available on any device
    • Technology
      • No CodeTailor eXo platform to your needs
      • ArchitectureAn overview of eXo Platform technology
      • IntegrationsAvailable connectors & integration capabilities
      • SecurityeXo Platform security measures
      • Open sourceComponents & licensing
  • Solutions
    • Communication
      • Modern IntranetBuild your company culture
      • Knowledge managementCentralize and share your company knowledge
      • Community managementEngage your community
      • ExtranetInvolve your clients and partners
    • Collaboration
      • Social NetworkConnect all your employees
      • Collaboration PlatformEmpower your teams
      • Employee PortalCentralize your work environment
      • Employee EngagementEngage & empower your employees
    • For
      • Public Sector
      • Networks
      • Education
      • Enterprises
  • Pricing
  • Resources
    • Resource center
      • Case studies
      • White Papers
      • Datasheets
      • Videos
    • Migration guide
      • Alternative to Microsoft 365
      • Alternative to Sharepoint
      • Alternative to Workplace from Meta
    • From The Blog
      • eXo Platform 6.5 is released: personalized navigation, multi-sites management and more
      • eXo launches its online community platform – eXo Tribe!
      • Cloud Vs On-premise Digital Workplace: Which one is right for your business?
  • Community
    • CommunityJoin our online community platform
    • DownloadLaunch eXo platform in your infrastructure
    • Source codeSource code on github
    • FAQsAbout the software, the community and our offers
    • REST APIs & DocumentationAll REST APIs available in eXo Platform
  • Company
    • Customers
    • Partners
    • Services
    • About us
    • Contact us
    • Newsroom
  • Menu mobile
    • Pricing
    • About us
    • Careers
    • Resource center
    • Blog
    • Contact us
    • Try eXo
Platform
  • Software Tour Features & capabilities overview
  • Why eXo eXo Platform key differentiators
  • Internationalisation Supporting multilingual environments
  • Mobile Responsive & available on any device
Technology
  • No Code Tailor eXo platform to your needs
  • Architecture An overview of eXo Platform technology
  • Integrations Available connectors & integration capabilities
  • Security eXo Platform security measures
  • Open source Components & licensing
Communication
  • Modern Intranet Build your company culture
  • Knowledge management Centralize and share your company knowledge
  • Community management Engage your community
  • Extranet Involve your clients and partners
Collaboration
  • Social Network Connect all your employees
  • Collaboration Platform Empower your teams
  • Employee Portal Centralize your work environment
  • Employee Engagement Engage & empower your employees
For
  • Public Sector
  • Networks
  • Education
  • Enterprises
Resource center
  • Case studies
  • White Papers
  • Datasheets
  • Videos
Migration guide
  • Alternative to Microsoft 365
  • Alternative to Sharepoint
  • Alternative to Workplace from Meta
From The Blog
  • eXo Platform 6.5 is released: personalized navigation, multi-sites management and more
  • eXo launches its online community platform – eXo Tribe!
  • Cloud Vs On-premise Digital Workplace: Which one is right for your business?
Community Join our online community platform
Download Launch eXo platform in your infrastructure
Source code Source code on github
FAQs About the software, the community and our offers
REST APIs & Documentation All REST APIs available in eXo Platform
Customers
Partners
Services
About us
Contact us
Newsroom
Pricing
About us
Careers
Resource center
Blog
Contact us
Try eXo
  1. Accueil
  2. Uncategorized
  3. Super easy guide: inject your portlets wherever you want!

Super easy guide: inject your portlets wherever you want!

With our extension mechanism, we can now package and deploy new features easily in eXo Platform 4 as add-ons. You can deploy your own portlets but also existing ones, ready to use and ready to be deployed, with the add-ons manager:

1-dynamic-container

Platform 4.1 has a new way to inject your portlets easily into pre-established places within the platform. It’s easy and we have covered most of the places you will need. Of course, the feature is extensible, which means you can define new places and then inject your portlets wherever you want

Let’s say you want to inject your new add-on into the Platform to add a simple new application on the top right of your Home:

2-new-add-on-placement

Most of the changes are going to be made within your WAR file in the file /webapp/WEB-INF/conf/portlet/dynamic-container-configuration.xml.

This file is imported into configuration.xml within the WAR. The goal is to redefine a configuration file from the WAR without overriding the previous one present with the exact same location and name in your Platform. (documentation).

dynamic-container-configuration.xml

<external-component-plugins>
	<target-component>org.exoplatform.commons.addons.AddOnService</target-component>
	<component-plugin>
		<name>addPlugin</name>
		<set-method>addPlugin</set-method>
		<type>org.exoplatform.commons.addons.AddOnPluginImpl</type>
		<description>add application Config</description>
		<init-params>
			<value-param>
				<name>priority</name>
				<value>1</value>
			</value-param>
			<value-param>
				<name>containerName</name>
				<value>top-application-container</value>
			</value-param>

			<object-param>
			<!-- You must define here the portlet Name -->
				<name>helloPortlet</name>
				<description>sample hello portlet</description>
				<object type="org.exoplatform.commons.addons.PortletModel">
					<field name="contentId">
					<!-- In the container definition within your jar you have added a new container : sampleDynamicContainer
					This container will contain the targeted portlet helloPortlet. -->
						<string>sampleDynamicContainer/helloPortlet</string>
					</field>
					<!--The following values are optionals-->
					...
				</object>
			</object-param>
		</init-params>
	</component-plugin>
</external-component-plugins>

This file declares the new add-on but also the container name where you want to inject it.

Your JAR should contain your backend and the portal container configuration in file /src/main/resources/conf/configuration.xml.

configuration.xml

<external-component-plugins>
<!-- The full qualified name of the PortalContainerConfig —>     
	<target-component>org.exoplatform.container.definition.PortalContainerConfig</target-component>
	<component-plugin>
	<!-- The name of the plugin -->
		<name>Add PortalContainer Definitions</name>
		<!-- The name of the method to call on the PortalContainerConfig in order to register the changes on the PortalContainerDefinitions -->
		<set-method>registerChangePlugin</set-method>
		<!-- The full qualified name of the PortalContainerDefinitionChangePlugin -->
		<type>org.exoplatform.container.definition.PortalContainerDefinitionChangePlugin</type>
		<init-params>
			<values-param>
				<name>apply.specific</name>
				<value>portal</value>
			</values-param>
			<object-param>
				<name>change</name>
				<object type="org.exoplatform.container.definition.PortalContainerDefinitionChange$AddDependencies">
				<!-- The list of name of the dependencies to add -->
					<field name="dependencies">
						<collection type="java.util.ArrayList">
							<value>
								<string>sampleDynamicContainer</string>
							</value>
						</collection>
					</field>
				</object>
			</object-param>
		</init-params>
	</component-plugin>
</external-component-plugins>

In this file we are updating the portlet configuration from the PortalContainerConfig to register the new sampleDynamicContainer in the PortalContainerDefinitions.

3-add-on-deployed

That’s just an example for a social intranet. With the new dynamic container we have provided, you are going to be able to inject your portlets more easily and safely.

You will find this example of packaging on the eXo Samples Repository. In the meantime, if you want to try ready-to-use add-ons for your Platform, check out the add-ons repository and of course you can submit your add-ons to the community!

Join the eXo tribe by registering for the community and get updates, tutorials, support, and access to the Platform and add-on downloads!


make-the-most-out-of-eXo-platform4

Make the most out of eXo Platform 4

Register to the next webinar and get a complete overview of what you can do with eXo Platform 4. Reserve your seat now!

Brahim Jaouane

I am a Digital Marketing specialist specialized in SEO at eXo Platform. Passionate about new technologies and Digital Marketing. With 10 years' experience, I support companies in their digital communication strategies and implement the tools necessary for their success. My approach combines the use of different traffic acquisition levers and an optimization of the user experience to convert visitors into customers. After various digital experiences in communication agencies as well as in B2B company, I have a wide range of skills and I am able to manage the digital marketing strategy of small and medium-sized companies.

Full-featured digital workplace with everything your employees need to work efficiently, smartly integrated for a compelling employee experience

  • Product
    • Software tour
    • Communication
    • Collaboration
    • Knowledge
    • Productivity
    • Open Source
    • Integrations
    • Security
  • Uses cases
    • Digital Workplace
    • Intranet software
    • Collaboration software
    • Knowledge management software
    • Entreprise Social Network
    • Employee Engagement platform
  • Roles
    • Internal Communications
    • Human Resources
    • Information Technology
  • Company
    • Product offer
    • Services Offer
    • Customers
    • Partners
    • About us
  • Resources
    • FAQs
    • Resource Center
    • Collaboration guide
    • What is a Digital workplace?
    • What is an intranet?
    • Employee engagement
  • Terms and Conditions
  • Legal
  • Privacy Policy
  • Accessibility
  • Contact us
  • Sitemap
  • Facebook
  • Twitter
  • LinkedIn
wpDiscuz