Template Library
The Jalpi Page Builder Template Library provides an integrated catalog of pre-designed pages, hero blocks, features, call-to-action sections, and full starter websites. Browse, preview structure trees, favorite designs, and insert ready-to-use layouts into your canvas with a single click or drag-and-drop gesture.
Template Library Overview#
Designing modern, responsive websites from scratch for every client or campaign is time-consuming. The Template Library accelerates development by giving creators instant access to professionally styled, structurally optimized layout components.
In Jalpi Page Builder, templates are decoupled into two clear paradigms:
- Individual Templates (User & Bundled): Modular, standalone components (individual elements, sections, or full page designs) stored in the WordPress database as private custom post types (
jalpi_template) or dynamically read from plugin assets. Users can freely save custom designs, export them as portable JSON files, or import external template files. - Complete Starter Site Kits: Turnkey multi-page website packages stored in
websites/*.json. A Starter Kit configures the entire site in one operation: creating all essential pages (Home, About, Services, Contact, Shop), assigning navigation menus, setting the front page, and automatically bootstrapping required plugins such as WooCommerce.
One-Click Insertion
Insert full pages or individual sections into your active canvas instantly. Imported blocks retain clean semantic markup and responsive flex/grid controls.
Interactive Structure Preview
Inspect the exact DOM hierarchy, section nesting, and widget types in an interactive structure wireframe tree before committing to an import.
Personal Favorites & Recents
Bookmark go-to section layouts with a star toggle. Favorites and recently used templates are stored per user in WordPress user meta.
Portability & JSON Export
Export any saved template to a standalone .json file with one click, or upload existing JSON files directly through the in-editor Import tab.
Accessing Template Library#
The Template Library is directly accessible from both the Jalpi visual editor and the WordPress administrative back-end:
1. From the Editor Toolbar & Palette
- Top Bar / Elements Panel: Click the folder/library icon in the editor toolbar to open the full-screen
TemplateLibrarymodal dialog. - Command Palette (Ctrl+K / βK): Open the Command Palette and type
templatesorlibraryto open the dialog without leaving your keyboard. - Canvas Section Inserter: When adding a new section at the bottom of the canvas, click the Add Template button next to the structural column presets.
2. From the WordPress Admin Dashboard
For complete multi-page Starter Kits, navigate to Jalpi Page Builder β Starter Sites (admin.php?page=jalpi-website-templates). This admin screen displays full turnkey sites, categories, live front-end preview URLs, and one-click site setup wizards.
Browsing Templates#
The Template Library modal (TemplateLibrary.tsx) provides a complete workspace for finding, filtering, organizing, and saving layouts:

Browse, Save New & Import Views
The header of the modal features three distinct mode tabs:
- Browse: The default gallery for searching and previewing bundled, kit, and user-saved templates.
- Save New: Form allowing you to save the currently selected canvas element, section, or the full page document into your personal template library.
- Import: Direct file uploader and JSON paste area to import templates into your database from disk.
Template Cards & Metadata
Each template in the gallery is represented by a rich card (TemplateCard):
- Visual Thumbnail: Displays a real rendered screenshot thumbnail or an elegant CSS gradient placeholder mapped to the template's category.
- Favorite Star: Clicking the star icon (β ) toggles the template in your personal favorites list with immediate optimistic UI feedback.
- Type Indicator: Color-coded badge indicating
page,section, orelement. - Category & Tags: Category label and clickable tag pills to rapidly refine results.
- Card Actions:
- Insert: Immediately injects the template into the active editor canvas.
- Preview (Eye): Opens the structure preview modal.
- Duplicate (Copy): Clones user templates (disabled for read-only kit templates).
- Export (Download): Downloads a cleanly formatted
{slug}.jsonfile. - Delete (Trash): Deletes user templates with confirmation prompt.
Grid vs List View Modes
Toggle between a spacious multi-column responsive Grid View (ideal for visually identifying designs from thumbnails) and a compact List View (ideal for quickly reviewing names, categories, and tags on smaller screens).
All, Favorites & Recently Used Scopes
Quickly isolate templates using the scope buttons:
- All: Full library catalog including starter kit sections and saved layouts.
- Favorites: Filtered strictly to items you have starred. Persisted in
_jalpi_tpl_favoritesin WordPress user meta. - Recently Used: Chronologically sorted history of templates you have inserted during recent editing sessions (persisted in
_jalpi_tpl_recent).
Template Preview#
Before modifying canvas content, you can inspect templates using the built-in preview dialog (TemplatePreviewModal).
Preview Dialog & Structure Tree
Clicking the thumbnail or the preview eye icon opens a focused preview modal:
- Header Meta: Shows the template title, type badge, category name, and optional description.
- Visual Thumbnail Banner: Highlights the color scheme or screenshot of the component.
- Interactive Structure Tree (
NodeWire): Renders a high-fidelity visual schematic of every section, container, column, heading, button, and image widget inside the template. You can verify column proportions and nesting depth before inserting.
Available Preview Actions
- Close (Esc): Dismisses the preview and returns to the browsing catalog.
- Insert Template: Directly commits the template to the editor and dismisses both modals.
Import Template#
Jalpi Page Builder supports multiple ways to insert or import templates into your editing workspace:
Step-by-Step Import Flow
- Open the Template Library modal (Ctrl+K β "Templates" or click the folder icon).
- Use categories or search to locate your desired template.
- (Optional) Click Preview to inspect the structural hierarchy.
- Click Insert Template.
- The editor automatically handles insertion based on the template type:
- Page Template: Calls
store.loadTemplateAsPage(sections), replacing current canvas sections with the template document. - Section Template: Calls
store.insertTemplateSection(node), appending the section beneath the currently selected section or at the bottom of the canvas. - Element Template: Calls
store.insertElementTemplate(node), nesting the widget inside the active container.
- Page Template: Calls
- A confirmation toast notification appears (e.g. "Section inserted"), and the template is logged to your Recently Used list.
Drag to Canvas Insertion
Every card in the Template Library is draggable. You can click and hold any card, drag it directly out of the modal, and hover over the canvas. Highlighting guides indicate insertion positions between existing sections, allowing you to drop templates exactly where needed.
Using Imported Templates#
Once inserted, templates are not locked or restricted:
Customizing & Editing Content
- Zero Lock-in: Every section, container, column, heading, and image node is converted into standard editable
CBNodeinstances with freshly generated unique IDs. - Full Navigator Integration: The imported nodes appear immediately in the right-hand Navigator (Layers panel), where you can rename, reorder, lock, or duplicate them.
- Inspector Editing: Selecting any imported element opens its full style controls (Typography, Spacing, Backgrounds, Borders, Responsive display).
Style Inheritance & Tokens
Imported templates utilize clean utility classes and CSS variables. If your site has configured global Design System tokens (primary brand colors, default typography scales, container max-widths), imported components inherit those variables, ensuring consistent brand styling.
Template Types#
Jalpi Page Builder organizes templates into three core operational types:
| Type | Target Level | Behavior on Insert | Common Examples |
|---|---|---|---|
page | Full Document | Loads full array of sections into pageData.sections. | Landing pages, Home pages, Contact pages, About pages, 404 pages. |
section | Section Block | Appends a single section node into the page structure. | Hero sections, Features grids, Testimonials, Pricing tables, FAQ accordions, CTA banners. |
element | Widget / Child Node | Inserts a styled widget inside the currently selected container. | Custom callout buttons, styled testimonial cards, interactive icon badges. |
Starter Kits#
Starter Kits represent complete multi-page turnkey websites bundled with Jalpi Page Builder.
Single Templates vs Full Starter Kits
- Single Templates: Stored as
jalpi_templatedatabase posts or exported JSON files. Used inside the editor for incremental page composition. - Starter Kits: Shipped as comprehensive site manifests in
websites/*.json(e.g. Agency, SaaS, Portfolio, Fitness, Restaurant). They include multiple interconnected pages, site chrome (header/footer templates), color palettes, font pairings, and menu structures.
Virtual Kit Template IDs
Rather than bloating the WordPress database with dozens of duplicate starter posts, Jalpi reads kit manifests on demand and surfaces individual kit pages and sections directly inside the Template Library using deterministic virtual IDs:
kit:<kit_id>:<slug>: Full page virtual template (e.g.kit:agency:home).kitsec:<kit_id>:<page_slug>:<section_id>: Single section virtual template (e.g.kitsec:agency:home:sec-hero).kitchrome:<kit_id>:<location>: Header or footer chrome template (e.g.kitchrome:agency:header).
Kit templates are marked read-only in the UI; you can insert them freely, but deleting or modifying the kit source JSON from the editor is prevented.
Search & Filtering#
The browsing view offers comprehensive filtering tools to find suitable layouts rapidly:
Category Filters & Counts
Categories are queried from the REST endpoint /templates/categories and display real-time item counts (combining saved database templates and virtual kit templates):
- Pages: Landing Pages, Home Pages, About Pages, Contact Pages, Services Pages, Portfolio Pages, Blog Pages, 404 Pages, Coming Soon, Maintenance, WooCommerce.
- Sections: Hero Sections, Features, CTA Blocks, Testimonials, Pricing Tables, Team, FAQ, Statistics / Counter, Logo Carousel, Forms.
- Site Chrome: Headers, Footers, Popups.
Tag Vocabulary Filtering
The tag bar displays popular keywords (e.g. dark, minimal, agency, saas, ecommerce). Clicking any tag instantly filters the gallery. Active tags can be cleared with one click.
Instant Debounced Text Search
The search bar filters templates by name and description in real-time. Input is debounced by 300ms to minimize server overhead while providing instant typing feedback. If no templates match, a helpful empty-state message appears with a shortcut button to save the current canvas as a new template.
Import Dependencies#
When importing full Starter Site Kits via the admin dashboard (POST /import-website), Jalpi automatically inspects and configures required dependencies:
WooCommerce Auto-Installation & Setup
If a Starter Kit requires WooCommerce (such as eCommerce stores or product showcases):
- The manifest declares
"requires_woocommerce": true. Jalpi_Woo::ensure_woocommerce()checks if WooCommerce is installed and active. If uninstalled, Jalpi fetches, installs, and activates WooCommerce automatically.- Catalog Seeding:
Jalpi_Woo::seed_products()automatically drafts foreign demo products from previous imports and seeds the fresh kit's demo products (prices, categories, images, SKU). - Store Configuration: Sets currency, units, tax display, and catalog defaults defined in the kit.
Slug Collision & Page Wiring
WooCommerce typically auto-generates default pages on installation. To prevent conflicts with the kit's custom-designed pages:
- Jalpi moves the default WooCommerce shop page to
/store/so the kit's designed/shop/page retains clean canonical routing. - Automatically assigns
woocommerce_cart_page_id,woocommerce_checkout_page_id, andwoocommerce_myaccount_page_idoptions to the newly imported pages. - Creates WordPress navigation menus from the kit definition and assigns them to the theme's primary navigation location.
Developer Information#
This technical reference covers the backend storage schema, REST routes, and React architecture of the Template Library.
Data Storage & jalpi_template CPT
Custom user templates are stored in the WordPress database as a private Custom Post Type registered in class-jalpi-templates.php:
- Post Type:
jalpi_template(registered with'public' => false,'show_ui' => false). - Post Title: Template name.
- Post Content: Optional template description.
- Post Meta:
_jalpi_tpl_type: String enum ('page' | 'section' | 'element')._jalpi_tpl_category: Category slug string._jalpi_tpl_data: JSON-encoded canvas node or page document array._jalpi_tpl_tags: Array of lowercase sanitized tag strings._thumbnail_id: Optional featured media attachment ID.
- Transients & Cache: The list transient
jalpi_editor_tpl_listis automatically invalidated onsave_post_jalpi_templateanddelete_post.
REST API Endpoints Reference
All Template Library endpoints reside under the jalpi-page-builder/v1 namespace:
| Method | Endpoint | Capability | Description |
|---|---|---|---|
| GET | /templates/categories | edit_posts | Returns category taxonomy slugs, labels, item counts, and tag vocabulary. |
| GET | /templates | edit_posts | Lists templates with pagination, search, category, type, tag, and scope filtering. |
| POST | /templates | edit_posts | Creates a new template (name, description, category, type, and node data). |
| POST | /templates/import | edit_posts | Imports a template from raw JSON payload with optional name override. |
| GET | /templates/{id} | edit_post | Fetches single template details including full node data. |
| POST | /templates/{id} | edit_post | Updates template metadata (name, description, category, thumbnail ID). |
| DELETE | /templates/{id} | edit_post | Permanently deletes a template post from the database. |
| POST | /templates/{id}/duplicate | edit_post | Clones an existing template into a new post titled "Copy of {Name}". |
| GET | /templates/{id}/export | edit_post | Generates exportable JSON envelope containing version, metadata, and node data. |
| GET | /kit-template/{eid} | edit_posts | Resolves a base64url-encoded virtual kit ID (kit:, kitsec:, kitchrome:). |
| GET | /templates/user-lists | edit_posts | Retrieves the current user's favorites and recently used template ID arrays. |
| POST | /templates/favorite | edit_posts | Toggles template ID in user's _jalpi_tpl_favorites meta. |
| POST | /templates/recent | edit_posts | Pushes template ID to top of user's _jalpi_tpl_recent meta (max 30 items). |
| POST | /import-website | manage_options | Full Starter Kit installation: creates all pages, menus, and configures WooCommerce. |
React Component Hierarchy
The editor frontend components are located in admin/editor/src/components/:
TemplateLibrary.tsx: Main modal handling tab switching (Browse/Save/Import), debounced search, infinite scroll sentinel, and grid/list layout modes.TemplateCard: Child card rendering thumbnails, favorite star, type badges, drag handlers, and quick actions.TemplatePreviewModal: Portal dialog rendering structure tree wireframes viaNodeWire.SaveTemplateModal.tsx: Standalone save dialog invoked when saving nodes directly from context menus.
Upcoming Roadmap Features
The following advanced template capabilities are scheduled on the Jalpi Page Builder roadmap:
| Feature | Status | Description |
|---|---|---|
| Cloud Template Library | π Coming Soon | Centralized cloud repository for syncing team templates across multiple WordPress installations without manual JSON file downloads. |
| Community Template Hub | π Coming Soon | Public repository for browsing and sharing community-designed section packs, headers, and footer blocks. |
| A/B Test Template Variants | π Coming Soon | Save multi-variant section templates directly into the library for automated conversion rate split-testing. |
Related Documentation#
Continue exploring Jalpi Page Builder template tools
- Templates Overview β High-level architecture of templates and starter kits.
- Import / Export β Exporting and importing page JSON archives.
- Starter Kits β Installing complete turnkey websites.
- Theme Builder Overview β Dynamic site-wide headers, footers, and archives.
- Jalpi REST API β Complete reference for all
jalpi-page-builder/v1endpoints.
Last updated: November 2026