Cookies help us enhance your experience on our site by storing
information about your preferences and interactions. You can customize your
cookie settings by choosing which cookies to allow. Please note that disabling
certain cookies might impact the functionality and features of our services,
such as personalized content and suggestions.
Cookie Policy
These cookies are strictly necessary for the site to work and may not be disabled.
Cookie name
Description
Lifetime
Provider
_ce.clock_data
Store the difference in time from the server's time and the current browser.
1 day
Crazy Egg
_ce.clock_event
Prevent repeated requests to the Clock API.
1 day
Crazy Egg
_ce.irv
Store isReturning value during the session
Session
Crazy Egg
_ce.s
Track a recording visitor session unique ID, tracking host and start time
1 year
Crazy Egg
_hjSessionUser_2909345
Store a unique user identifier to track user sessions and interactions for analytics purposes.
1 year
HotJar
_hjSession_2909345
Store session data to identify and analyze individual user sessions.
1 day
HotJar
apt.uid
Store a unique user identifier for tracking and personalization.
1 year
Mageplaza
cebs
Store user preferences and settings.
Session
Mageplaza
cf_clearance
Store a token that indicates a user has passed a Cloudflare security challenge.
1 year
Cloudflare
crisp-client
The crisp-client/session cookie is used to identify and maintain a user session within the Crisp platform. It allows the live chat system to recognize returning users, maintain chat history, and ensure continuity in customer service interactions.
Session
Crisp
_ga
Store a unique client identifier (Client ID) for tracking user interactions on the
2 years
Google
_ga_7B0PZZW26Z
Store session state information for Google Analytics 4.
2 years
Google
_ga_JTRV42NV3L
Store session state information for Google Analytics 4.
2 years
Google
_ga_R3HWQ50MM4
Store a unique client identifier (Client ID) for tracking user interactions on the website.
2 years
Google
_gid
Store a unique client identifier (Client ID) for tracking user interactions on the website.
1 day
Google
_gat_UA-76130628-1
Throttle the request rate to Google Analytics servers.
1 day
Google
Advertising cookies
Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.
Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.
Cookie name
Description
Lifetime
Provider
_gcl_au
The cookie is used by Google to track and store conversions.
1 day
Google
__Secure-3PAPISID
This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising.
2 years
Google
HSID
This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data and protect visitor data from unauthorized access.
2 years
Google
__Secure-1PSID
This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising.
2 years
Google
SID
This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data and protect visitor data from unauthorized access.
2 years
Google
APISID
This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions.
2 years
Google
__Secure-1PAPISID
This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising.
2 years
Google
__Secure-3PSID
This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising.
2 years
Google
SSID
This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions.
2 years
Google
SAPISID
This cookie is used by Google to display personalized advertisements on Google sites, based on recent searches and previous interactions.
2 years
Google
__Secure-3PSIDTS
This cookie collects information about visitor's interactions with Google services and ads. It is used to measure advertising effectiveness and deliver personalised content based on interests. The cookie contains a unique identifier.
2 years
Google
__Secure-1PSIDTS
This cookie collects information about visitor's interactions with Google services and ads. It is used to measure advertising effectiveness and deliver personalised content based on interests. The cookie contains a unique identifier.
2 years
Google
SIDCC
This security cookie is used by Google to confirm visitor authenticity, prevent fraudulent use of login data, and protect visitor data from unauthorized access.
3 months
Google
__Secure-1PSIDCC
This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising.
1 year
Google
__Secure-3PSIDCC
This cookie is used for targeting purposes to build a profile of the website visitor's interests in order to show relevant and personalized Google advertising.
1 year
Google
1P_JAR
This cookie is a Google Analytics Cookie created by Google DoubleClick and used to show personalized advertisements (ads) based on previous visits to the website.
1 month
Google
NID
Show Google ads in Google services for signed-out users.
6 months
Google
Analytics cookies
Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.
Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.
Cookie name
Description
Lifetime
Provider
_dc_gtm
Manage and deploy marketing tags through Google Tag Manager.
1 year
Google
1P_JAR
Gather website statistics and track conversion rates for Google AdWords campaigns.
1 month
Google
AEC
1 month
Google
ar_debug
Debugging purposes related to augmented reality (AR) functionalities.
1 month
Doubleclick
IDE
The IDE cookie is used by Google DoubleClick to register and report the user's actions after viewing or clicking on one of the advertiser's ads with the purpose of measuring the effectiveness of an ad and to present targeted ads to the user.
1 year
Doubleclick
ad_storage
Enables storage, such as cookies (web) or device identifiers (apps), related to advertising.
1 year
Google
ad_user_data
Sets consent for sending user data to Google for online advertising purposes.
1 year
Google
ad_personalization
Sets consent for personalized advertising.
1 year
Google
analytics_storage
Enables storage, such as cookies (web) or device identifiers (apps), related to analytics, for example, visit duration.
Show cms static block from template phtml file - Mageplaza
How to show cms static block from template phtml file in Magento 2
Vinh Jacker|03-17-2025
Introduction
Magento 2 static block is an effective tool to help store admins add and manage HTML code, which controls frontend display, usually for size charts, sale promotions, incentive banners, policies, etc. The main goal of creating static blocks is to save admins a lot of time diving into thousands of code lines whenever updating the websites.
In this article, we will get to know all the necessary elements for a basic understanding of static block as well as steps to call CMS static block from phtml file in Magento 2. Guarantee after the blog, you’ll find it easy to manage the incentive bar or sale promotion banner as you wish.
Static Block for Magento 2
Mageplaza Better Static Block is a helpful solution to manage the content of store sites properly.
First of all, you need to distinguish two types of site pages: static page and dynamic page. On the one hand, static pages remain unchanged regardless of all the actions implemented on them by an admin. On the other hand, by containing various blocks, a dynamic page can be modified to display banners, pop-ups, or any other features based on its user’s actions on that page.
Normally, store owners would use static pages to show unchanged information like the store contract, return policy, company introduction, delivery regulations, etc. The dynamic page, in contrast, is used for product or checkout pages to display offers banners, promotion pop-ups, and so on.
Some Key Components of Magento 2 Static Blocks
To create a static block, please navigate to your admin panel > CMS > Manage Pages > Add New Page. There will be several components to create a new static element for your site, including:
General Information
In this field, you need to set your page’s basic information such as:
Page title: The page name that is displayed in the reviewer’s browser header and in the site page list.
SEF URL Identifier: The page identification number that requires you to insert the URL that you want to apply in a browser address bar. Remember, you must not contain spaces and use Roman symbols only in this field. If your site does not have the Roman alphabet, using a URL translation service would be fine.
Status: The page status: Enable or Disable.
Content: The static page text of information to display.
Custom Design
This is the field to customize your site design.
Custom Theme: Set the template theme for this page as you like. The theme between pages can be different from each other.
Custom Theme From/ Custom Theme To: Indicate your selected template’s term of action.
Layout: Choose a theme with one, two, or three columns.
Layout Update XML: Change the layout chosen in the previous section, and the updates will affect this particular page only.
Meta Data
In this section, it’s simply about setting “Keywords,” “Description,” and other Meta Data.
After all the modifications are completed, remember to click on the “Save Page” button and then open your newly created page in a browser to double-check how it looks.
Step to create a static block
A static block in Magento 2 can be a text or HTML code which is in any part of your site and remains unaffected by user interactions on the website. These blocks are configurable via the admin panel, offering online store owners the capability to add advertisement banners, category links, informative bars, and other valuable elements to their websites. Some administrators also utilize these blocks for showcasing social ads and other engaging features that aid in site promotion.
To create a static block in Magento, follow these steps:
Access the admin panel, navigate to Content > Elements > Blocks Add New Block. You will then see a page featuring various settings that can be adjusted to tailor the functionality and appearance of your block.
Enable Block: Choose Yes to activate the block
Block Title: The name of your block, which will be visible in the list of blocks within your admin panel.
Identifier: This field is essential, as it necessitates a unique identifier for your block.
Store View: Select the store views to display the static block in.
Block Content: This field accommodates the content you want your individual block to display, whether it’s advertisement text, information, HTML code, or other content.
Now, click Save Block to save all the changes you have made.
How to show CMS static block from template PHTML file in Magento 2
Magento 2 provides users with CMS Static Block, which is useful in showing text, photos, videos, and other materials on the webpage. Dynamic content can also be added via widgets in the static blocks. Using Magento 2 CMS Static Block enables you to edit and design those content with ease. When you have created the block and want to show it from the phtml file, this tutorial is for you.
Hope this helpful article shows you the quick process of displaying CMS static block from template phtml file in Magento 2. If you are interested in adding a CMS Block in the Checkout page, which may seem a little troublesome, feel free to take a look at this article. In case that you have any queries about the article or any questions in general, use the comment section below!
Jacker is the Chief Technology Officer (CTO) at Mageplaza, bringing over 10 years of experience in Magento, Shopify, and other eCommerce platforms. With deep technical expertise, he has led numerous successful projects, optimizing and scaling online stores for global brands. Beyond his work in eCommerce development, he is passionate about running and swimming.
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.
Discover a step-by-step framework for effective social media marketing. Learn how to optimize content, run ads, track KPIs, and future-proof your strategy across all major platforms.