The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
617 Ready
473 Need Help
๐Ÿ† Leaderboard
Actively Maintained v1.0.8

Panth HTML Sitemap

mage2kishan/module-html-sitemap

Adds a customer-facing /sitemap page to Magento 2 with a nested category tree, a paginated product grid that scales to 100k+ products, CMS pages, store switcher, and custom links, configurable via 15 admin toggles. Theme-agnostic plain PHP/vanilla JS rendering on Hyva and Luma.

34
Downloads
Below average
0
GitHub Stars
Today
Last Release
0
Open Issues
Build Issues
0/3 checks passed

Build Tests

Composer Install
โ€“ DI Compile
โ€“ Templates

Code Quality

CS Coding Standard
โ€“ PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.0.8 on Magento 2.4.9
Jun 18, 2026
v1.0.7 on Magento 2.4.9
Jun 7, 2026
v1.0.3 on Magento 2.4.9
Jun 1, 2026

Looking for Contributors

Composer installation fails. Your contribution could help the entire Magento community!

Contribute

Share This Module's Status

Panth HTML Sitemap Magento compatibility status badge

README

Loaded from GitHub

Panth HTML Sitemap โ€” Customer-facing /sitemap Page for Magento 2 (Hyva + Luma)

A complete, theme-agnostic HTML sitemap page for Magento 2 at /sitemap โ€” categories as a nested tree, products in a paginated grid that handles 100k+ catalogs, CMS pages, store switcher and custom links. Works identically on Hyva and Luma. Plain PHP + vanilla JS + scoped CSS โ€” no Alpine / RequireJS / mage-init glue.

Magento's built-in XML sitemap is for Google. This module is for humans โ€” a readable page your customers land on when they're lost, and an internal-linking surface that spreads PageRank across every category and product on your store.


Preview

Admin Configuration

Admin Configuration โ€” Stores โ†’ Configuration โ†’ Panth Infotech โ†’ HTML Sitemap

All 15 toggles at Stores โ†’ Configuration โ†’ Panth Infotech โ†’ HTML Sitemap โ€” master switch, show categories (with max-depth limit), show products (with sort order, URL structure, pagination), show CMS pages (with exclude list), show store switcher, show custom links, meta title / description, client-side search field, and products-per-page (50โ€“2000, default 500 โ€” the sitemap handles 100k+ products via ?p=N pagination).


Frontend โ€” Hyvรค theme

Native Hyvรค styling โ€” gradient hero with live counts (categories / products / pages), sticky "On this page" sidebar, and a scoped stylesheet so nothing leaks into the theme's Tailwind bundle.


Frontend โ€” Luma theme

Identical markup on Luma โ€” the template is plain PHP + vanilla JS + prefix-scoped CSS (.panth-htmlsitemap), so the same rendering logic produces the same output under Luma's RequireJS layer without any theme-specific overrides.


Need Custom Magento 2 Development?

Kishan Savaliya

Top Rated Plus on Upwork

Panth Infotech Agency


Table of Contents


Features

  • /sitemap URL โ€” clean custom-router URL, no /seo/ or /htmlsitemap/ prefix visible to customers.
  • Nested category tree โ€” respects store root, max-depth limit, is_active, and a per-category exclude_from_html_sitemap flag.
  • Product grid with pagination โ€” ?p=N pagination for large catalogs, admin-configurable page size (50โ€“2000, default 500), absolute hard cap of 2,000 pages, efficient COUNT(DISTINCT) + LIMIT/OFFSET on indexed EAV joins.
  • Product sort options โ€” name Aโ†’Z, name Zโ†’A, newest, oldest, price ascending, position.
  • Short vs category URLs โ€” choose whether product links are /product.html or /category/product.html.
  • CMS pages list โ€” excludes homepage + no-route automatically; admin-configurable extra exclusions (e.g. privacy-policy,cookie-policy).
  • Store switcher โ€” optional list of all active stores with their base URLs.
  • Custom links โ€” free-form admin textarea, one link per line (URL | Label).
  • Client-side search โ€” optional search box filters the visible sections in real time, no network calls.
  • SEO-friendly meta โ€” admin-configurable meta title and meta description.
  • Theme-agnostic rendering โ€” plain PHP + inline vanilla JS + prefix-scoped CSS class. No Alpine, no RequireJS, no mage-init.

Scales to 100k+ Products

The product section is designed for real catalogs:

  • Pagination: default 500 products per page via ?p=N. Admin-configurable 50โ€“2000.
  • Absolute hard cap: 2,000 pages regardless of catalog size โ€” beyond that an XML sitemap is the right tool.
  • Efficient queries: one COUNT(DISTINCT e.entity_id) for total count (memoised per request), then LIMIT/OFFSET on the paged SELECT. No array_slice on giant arrays, no full catalog load into memory.
  • Indexed joins only: catalog_product_entity ร— catalog_product_website ร— catalog_product_entity_int (visibility + status) โ€” every filter column is indexed in stock Magento.

Benchmarked render time per page is roughly constant regardless of total catalog size: the sitemap page for product #50,000 renders as fast as the one for product #1.


Compatibility

Requirement Supported
Magento Open Source 2.4.4, 2.4.5, 2.4.6, 2.4.7, 2.4.8
Adobe Commerce 2.4.4 โ€” 2.4.8
PHP 8.1, 8.2, 8.3, 8.4
Hyva Theme 1.0+ (theme-agnostic template)
Luma Theme Native support
Panth Core ^1.0 (installed automatically)

Installation

composer require mage2kishan/module-html-sitemap
bin/magento module:enable Panth_Core Panth_HtmlSitemap
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Verify

bin/magento module:status Panth_HtmlSitemap
# Module is enabled

Then visit https://your-store.example/sitemap.


Admin Configuration

Navigate to Stores โ†’ Configuration โ†’ Panth Infotech โ†’ HTML Sitemap. A direct link also appears under the Panth Infotech admin sidebar.

Setting Default Purpose
Enable HTML Sitemap Yes Master switch. No = /sitemap returns 404.
Show Categories Yes Render the nested category tree.
Max Category Depth 0 Limit tree depth. 0 = unlimited.
Show Products Yes Render the paginated product grid.
Product Sort Order Name (A-Z) Name/newest/oldest/price/position.
Product URL Structure Short /product.html vs /category/product.html.
Products Per Page 500 Pagination size. Range 50โ€“2000.
Show CMS Pages Yes Include active CMS pages.
Show Store Switcher No List all active stores.
Show Custom Links No Render admin-editable link list.
Custom Links (empty) URL | Label one per line.
Meta Title Site Map <title> on the sitemap page.
Meta Description (empty) <meta name="description">.
Exclude CMS Pages (empty) Comma-separated identifiers to hide.
Show Search Field No Client-side filter across visible sections.

Hiding a Category

Every category now has an "Exclude from HTML Sitemap" field in Catalog โ†’ Categories โ†’ {category} โ†’ Search Engine Optimization. Flip it to Yes to hide that category (and its link-children reset to the catalog root, not the hidden category) from the rendered tree. Flush the sitemap's layout cache after changes.


Troubleshooting

/sitemap returns 404

Check the master toggle: Stores โ†’ Configuration โ†’ Panth Infotech โ†’ HTML Sitemap โ†’ Enable HTML Sitemap must be Yes. If the module is installed but the config was never saved, the config.xml default (enabled=1) still applies โ€” flush config cache.

Products page shows empty after pagination

Two causes: (a) ?p=N is beyond the last page โ€” clamp client-side to getTotalProductPages(); (b) the visible-product join returns nothing because the store has no products with visibility IN (2,4) and status = 1. Run SELECT COUNT(*) FROM catalog_product_entity to sanity-check the catalog.

DI compile fails after composer require

Ensure Panth_Core, Magento_Store, Magento_Catalog, Magento_Cms and Magento_Eav are all enabled โ€” they are hard dependencies.


Support

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.