How to Add Handle Programmatically in Layout File

Blog
Spread the love

Layout Handle:-

Layout handle is a string that links an XML layout file with a specific page or group of pages. page-type layout handles: A page type identifier corresponds to the full name of the controller action.

This means we are adding layout in another layout xml using add handle.

But in this blog we are trying to add layout handle using events.

You can follow these steps:

Step1 – Firstly, create a simple module.

then create events.xml file inside [Vendor]\[Module]\[etc]/[area] path

and add below code in events.xml file

Step2 – create LayoutLoadBefore.php file inside.

[Vendor]\[Module]\Observer path

and add below code in LayoutLoadBefore.php

bluethinkinc_blog

bluethinkinc_blog

2023-06-06

0

Leave a Reply

Your email address will not be published. Required fields are marked *

Find More Blogs

PODMAN

Spread the love 1.Introduction Podman: The Modern Container

Running Your Java Program (JAR) 24/7 on AWS EC2 Automatically

Spread the love Introduction Running a Java application

Building a REST API with Spring Boot

Spread the love Introduction REST (Representational State

Custom API to Fetch Customer Data by Customer ID in Spryker

Spread the love Introduction In this blog post, we will

Creating a Custom Module for a Custom Frontend Page in Spryker

Spread the love To create a custom module for a custom

How to create custom module api get category list without access token in Spryker

Spread the love To create a custom API for fetching a

Creating a Custom Glue API in Spryker

Spread the love Spryker’s Glue API is a powerful tool

Get AI Generated 360-Degree View of Account Summary in Dynamics 365 Sales

Spread the love Navigating the demanding landscape of sales

Enhancing Productivity with Dynamics 365: The Power of Session Restore

Spread the love Enhancing Productivity with Dynamics 365:

Salesforce Admin

Spread the love In our last blog, we discussed common

bluethinkinc Blogs