This website uses cookies to ensure you get the best experience on our website.

Skip to content
LOGO
  • Company

    About IGNEK

    Learn about our story and our mission.

    Careers

    We're hiring!

    We always looking for talented peoples. Join our team!

    Blogs

    The latest industry news, updates and info.

    Case Studies

    Take a closer look at the projects we've delivered

    Webinar

    Watch our latest organized webinar

    Get in touch with our HR team

    • hr@dev.ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Custom Enterprise Portal Development for flawless Solutions

    Dedicated Development Team

    Expand Teams, Optimize Development with Our Expertise

    Back-end Development

    Empowering your digital presence with robust backend development expertise

    Front-end Development

    Crafting engaging user experiences through expert frontend development

    Digital Transformation

    Embrace digital transformation by modernizing process

    SaaS Development

    Transform your business with SaaS Innovative Solutions

    Technologies

    Liferay Services

    Development & Customization

    Theme

    Upgradation

    Migration

    Proof of Concept

    Performance Tunning

    Architecture

    Support & Maintenance

    E-commerce

    Expert Advice

    React Services

    Enterprise Development

    Custom Application

    Single Page Application

    Architecture

    API Integration

    Migration

    Consulting

    Maintenance & Support

    Spring Boot Services

    Web Service

    MVC Web Development

    API Integration

    Security

    Migration

    Microservices

    Support & Maintenance

    AEM Services

    Consulting Service

    Site Development

    Migration & Upgradation

    Integration

    Maintenance & Support

    Custom Solutions

    Content Management

    Team Augementation

  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Transforming industries through cutting edge SaaS solutions.

    Customer Portal : Boost Business Productivity

    Streamline operations and enhance productivity with our Customer Portal solution.

    Liferay Based Intranet Portal

    Internal portal for company communication, collaboration and resources

    Integration

    Matomo Integration with Liferay

    Integrate Matomo to enable user interactions seamlessly.

    Microsoft Teams integration with Liferay

    Integrate to enable seamless collaboration, messaging within your portal.

    Jira Integration With Liferay

    Optimizes business operations by integrating with Jira.

  • Hire Us

    Liferay

    Get expert Liferay developers for seamless portal solutions.

    React JS

    Get expert ReactJS developers for dynamic web solutions.

    Web Developer

    Get custom web solutions from IGNEK's expert developers.

    Spring Boot

    Get top-notch Spring Boot developers for your project success!

    Healthcare

    Get top Healthcare Developers for cutting-edge medical software.

    MERN Stack

    Get expert MERN developers from IGNEK for custom, innovative project solutions.

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@dev.ignek.com
    • +91 6351576580
    • info@dev.ignek.com
    • Ahmedabad, Gujarat, India – 382470
SCHEDULE CALL
  • COMPANY
    • About
    • Case Studies
    • Blogs
    • Career
    • Webinar
  • SERVICES
    • Enterprise Portal Development
    • Dedicated Development Team
    • Back-end Development
    • Front-end Development
    • Digital Transformation
    • SaaS Development
  • SOLUTION
    • Customer Portal:  Boost Business Productivity
    • SaaS : Software as a Service
    • Liferay Based Employee Intranet Portal
  • TECHNOLOGY
    • Liferay Services
      • Liferay Development and Customization
      • Liferay Theme Development Service
      • Liferay DXP 7.4 Upgrade
      • Liferay Migration
      • Liferay Proof Of Concept
      • Liferay Performance Tuning
      • Liferay Architecture Design Service
      • Liferay Support And Maintenance Service
      • Liferay Ecommerce Development
      • Liferay Expert Advice
    • ReactJS Services
      • ReactJS Enterprise Application Development
      • ReactJS Custom Application Development
      • ReactJS Single Page Application Development (SPA)
      • ReactJS Applications Architecture
      • ReactJS API Integration
      • ReactJS Migration
      • ReactJS Consulting
      • ReactJS Maintenance and Support
    • Spring Boot Services
      • Spring Boot Web Development Service
      • Spring MVC Web Development
      • Spring Boot API Integration Service
      • Spring Boot Security
      • Spring Boot Migration Service
      • Spring Boot Microservices
      • Spring Boot Support & Maintenance Service
    • AEM Development Services
      • AEM Consulting Services
      • AEM Site Development
      • AEM Migration & Upgradation
      • AEM Integration Services
      • AEM Maintenance & Support
      • AEM Content Management
      • Custom AEM Solutions
      • AEM Team Augmentation
  • INTEGRATION
  • HIRE US
    • Hire Liferay Developer
    • Hire ReactJS Developer
    • Hire Spring Boot Developer
    • Hire Healthcare Developer
    • Hire Web Developer
    • Hire MERN Stack Developer
  • CONTACT US
  • Company

    About IGNEK

    Careers

    We're hiring!

    Blogs

    Case Studies

    Webinar

    Get in touch with our HR team

    • hr@dev.ignek.com
    • +91 93284 95160
    • Ahmedabad, Gujarat, India – 382470
  • Services

    Enterprise Portal Development

    Dedicated Development Team

    Back-end Development

    Front-end Development

    Digital Transformation

    SaaS Development

    Technologies

    Liferay Liferay Services
    • Development & Customization
    • Theme
    • Upgradation
    • Migration
    • Proof of Concept
    • Performance Tuning
    • Architecture
    • Support & Maintenance
    • E-commerce
    • Expert Advice
    React React Services
    • Enterprise Development
    • Custom Application
    • Single Page Application
    • Architecture
    • API Integration
    • Migration
    • Consulting
    • Maintenance & Support
    Spring Boot Spring Boot Services
    • Web Service
    • MVC Web Development
    • API Integration
    • Security
    • Migration
    • Microservices
    • Support & Maintenance
    AEM AEM Services
    • Consulting Service
    • Site Development
    • Migration & Upgradation
    • Integration
    • Maintenance & Support
    • Custom Solutions
    • Content Management
    • Team Augmentation
  • Solution

    Ready for digital excellence

    In our rapidly evolving world, businesses are always on the lookout for fresh ways to improve their operations and connect with their audiences.

    Contact US

    Solutions

    SaaS : Software As A Service

    Customer Portal : Boost Business Productivity

    Liferay Based Intranet Portal

    Integration

    Matomo Integration with Liferay

    Microsoft Teams integration with Liferay

    Jira Integration With Liferay

  • Hire Us

    Liferay

    React JS

    Web Developer

    Spring Boot

    Healthcare

    MERN Stack

    Why Hire Developers From IGNEK ?

    • Certified Developer
    • Transparent Communication
    • Flexible Hiring Modals
    • Fully Signed NDA
    • Cost Effective
    • Easy Exit Policy

    Get in touch with our Sales team

    • sales@dev.ignek.com
    • +91 6351576580
    • IGNEK
    • Ahmedabad, Gujarat, India – 382470
  • SCHEDULE CALL

Site Initializer Using Client Extension

  • Liferay
  • July 19, 2024

Share On :

Introduction:

Liferay site initializer is like a blueprint or a set of instructions that automatically sets up a new website when it’s created. It’s a handy tool for making sure every new website on the Liferay portal starts off the right way without manual setup every time.

Client Extensions are a powerful way to customize and extend our Liferay site safely and flexibly. By keeping our customizations separate from the core code, We can easily manage updates and maintain our site.

Want to know more about Client Extensions then take a reference from here.

To create a site initializer using a client extension, we simply need to create a Client Extension of type “Site Initializer”. When deploying the client extension, it automatically sets up the site. Within the Client Extension, include all necessary files that are to be configured during the site creation process.

Prerequisites:
  • Liferay
Steps to create site initializer using client extension.
  1. Create a client extension directory.
  2. Create a client-extension.yaml file within it.
  3. Create a site-initializer folder and place all the necessary integration components in it.
  4. Deploy the client extension.

STEP 1: Create a client extension directory.

Open the codebase and create a folder named client-extensions.

Create Client Extension Directory

Now in a client-extensions folder create a liferay-site-initializer (Project Folder Name).

STEP 2: Create a client-extension.yaml file within it.

Now create a client-extension.yaml file in the liferay-site-initializer folder.

Put this thing in this yaml file and then let’s discuss all the points one by one.

				
					liferay-sample-site-initializer:
    name: Liferay Site Initializer
    oAuthApplicationHeadlessServer: liferay-site-initializer-oauth-application-headless-server
    siteExternalReferenceCode: liferaySiteInitializer
    siteName: Liferay Sample Site
    type: siteInitializer
liferay-site-initializer-oauth-application-headless-server:
    .serviceAddress: localhost:8080
    .serviceScheme: http
    name: Liferay Sample OAuth Application Headless Server
    scopes:
        - Liferay.Headless.Site.everything
    type: oAuthApplicationHeadlessServer

				
			

This YAML configuration file defines two key components: a site initializer (liferay-sample-site-initializer) responsible for setting up a sample site in Liferay, and an OAuth application headless server (liferay-site-initializer-oauth-application-headless-server) that handles authentication and potentially other secure interactions with Liferay services. Each section provides specific details necessary for their respective functionalities within the Liferay platform.

1. Site Initializer (liferay-sample-site-initializer):

Purpose: A Site Initializer automates the setup of a new site in Liferay.

Configuration:

name: Specifies the name of the Site Initializer (e.g., “Liferay Site Initializer”).

siteExternalReferenceCode: Provides an external reference code for identification.

siteName: Defines the name of the sample site to be created (e.g., “Liferay Sample Site”).

type: Indicates that it’s a siteInitializer, designed to initialize and configure new sites automatically in Liferay.

Functionality: Automatically creates or configures a predefined site structure, pages, navigation, and other settings when deployed in Liferay.

2. OAuth Application Headless Server (liferay-site-initializer-oauth-application-headless-server):

Purpose: Facilitates secure interaction with Liferay’s APIs using OAuth authentication.

Configuration:

name: Specifies the name of the OAuth Application Headless Server (e.g., “Liferay Sample OAuth Application Headless Server”).

.serviceAddress: Defines the address where the OAuth server is located (e.g., localhost:8080).

.serviceScheme: Specifies the communication protocol scheme (e.g., http).

scopes: Lists the permissions (scopes) granted to the OAuth application, such as Liferay.Headless.Site.everything.

type: Indicates that it’s an oAuthApplicationHeadlessServer, specifically designed for integrating OAuth-based authentication mechanisms with Liferay services.

Functionality: Enables secure API access to Liferay’s resources, ensuring authenticated and authorized interactions between external systems and Liferay.

STEP 3: Create a site-initializer folder and place all the necessary integration components in it.

We are creating a site initializer folder, and within the site initializer, we are creating an object-definitions folder and integrating object definitions json file into it. 

When we deploy the extension, it will automatically create an object for us.

Client Extension Hierarchy
				
					test-object-definition-1.json
{
  "label": {
    "en_US": "Liferay Custom Object 1"
  },
  "name": "LifearyCustomObject1",
  "objectFields": [
    {
      "DBType": "String",
      "indexed": false,
      "indexedAsKeyword": false,
      "label": {
        "en_US": "Field 1"
      },
      "name": "field1",
      "required": false
    }
  ],
  "pluralLabel": {
    "en_US": "Liferay Custom Object 1"
  },
  "scope": "site"
}




				
			

Note: If we want to add any other functionality to our site initializer, we just need to add the folder and put the JSON file in it.

STEP 4: Deploy client extension.

Open the client-extensions folder in the terminal.

Now, enter this Gradle deploy command to deploy the client extension.

../gradlew deploy

Now, we can see that the site and object are created.

Created Site
Created Object
Conclusion:

Creating a site initializer using a client extension in Liferay is a powerful and efficient way to automate the setup of new sites. By following the steps outlined in this guide, you can ensure that every new site starts with the right configuration and components, saving time and reducing the potential for errors. Leveraging the flexibility of client extensions, you can customize your Liferay site safely and manage updates with ease. With the ability to integrate additional functionalities seamlessly, the site initializer is an invaluable tool for maintaining consistency and efficiency across your Liferay portal. Start implementing site initializers today to streamline your site creation process and enhance your Liferay experience.

Explore Our Services

Discover how we can help your business thrive, whether you’re running a small startup, an SME, or a large enterprise. We’re here to understand your unique needs and goals, offering the expertise and resources to support your journey to success.

Stay informed about our Liferay services and updates by subscribing to our newsletter—just fill in the details below to subscribe.

Loading
Loading...

Related Blogs

December 1, 2023
Liferay object With Message Bus
Liferay Objects with Message bus
May 31, 2024
Managing Relationships in Liferay Objects
Managing Relationships in Liferay Objects
July 19, 2024
What Is Client Extension & How We Can Use
What Is Client Extension & How We Can Use?
Loading...

Featured Projects Portfolios

June 19, 2024
Music License Management Portal _ Onboarding & Data Integrity
Music License Management Portal : Onboarding & Data Integrity

Digital Solutions for Your Business with IGNEK

4.9

5.0

5.0

5.0

LOGO

Making the world a better place through constructing elegant hierarchies

COMPANY

  • About
  • Career
  • Case Study
  • Blogs

SERVICES

  • Enterprise Portal Development
  • Dedicated Development Team
  • Back-end Development
  • Front-end Development
  • Digital Transformation
  • SaaS Development

HIRE US

  • Liferay
  • Spring Boot
  • ReactJS
  • Healthcare
  • MERN Stack
  • AEM

CONTACT

  • info@dev.ignek.com
  • info@dev.ignek.com
SALES
  • sales@dev.ignek.com
  • (+91) 635 157 6580
CAREER
  • hr@dev.ignek.com
  • (+91) 932 849 5160
  • E 910-912, Ganesh Glory 11, Jagatpur Road, SG Highway, Ahmedabad, Gujarat - 382470

© 2018-2025 IGNEK, Inc. All rights reserved

Linkedin Facebook X-twitter Instagram