Free cookie consent management tool by TermsFeed Generator
All Products & Integrations

jalpi page builder docs

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.

Active Feature Templates React & REST API
11 min read Β· November 2026

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:

  1. 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.
  2. 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 TemplateLibrary modal dialog.
  • Command Palette (Ctrl+K / ⌘K): Open the Command Palette and type templates or library to 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:

Nova Team Section Template Preview
Figure: Actual pre-built section template thumbnail from the Jalpi Template Library (Nova Team Section).

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, or element.
  • 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}.json file.
    • 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_favorites in 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

  1. Open the Template Library modal (Ctrl+K β†’ "Templates" or click the folder icon).
  2. Use categories or search to locate your desired template.
  3. (Optional) Click Preview to inspect the structural hierarchy.
  4. Click Insert Template.
  5. 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.
  6. 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 CBNode instances 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:

TypeTarget LevelBehavior on InsertCommon Examples
pageFull DocumentLoads full array of sections into pageData.sections.Landing pages, Home pages, Contact pages, About pages, 404 pages.
sectionSection BlockAppends a single section node into the page structure.Hero sections, Features grids, Testimonials, Pricing tables, FAQ accordions, CTA banners.
elementWidget / Child NodeInserts 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_template database 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):

  1. The manifest declares "requires_woocommerce": true.
  2. Jalpi_Woo::ensure_woocommerce() checks if WooCommerce is installed and active. If uninstalled, Jalpi fetches, installs, and activates WooCommerce automatically.
  3. 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).
  4. 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, and woocommerce_myaccount_page_id options 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_list is automatically invalidated on save_post_jalpi_template and delete_post.

REST API Endpoints Reference

All Template Library endpoints reside under the jalpi-page-builder/v1 namespace:

MethodEndpointCapabilityDescription
GET/templates/categoriesedit_postsReturns category taxonomy slugs, labels, item counts, and tag vocabulary.
GET/templatesedit_postsLists templates with pagination, search, category, type, tag, and scope filtering.
POST/templatesedit_postsCreates a new template (name, description, category, type, and node data).
POST/templates/importedit_postsImports a template from raw JSON payload with optional name override.
GET/templates/{id}edit_postFetches single template details including full node data.
POST/templates/{id}edit_postUpdates template metadata (name, description, category, thumbnail ID).
DELETE/templates/{id}edit_postPermanently deletes a template post from the database.
POST/templates/{id}/duplicateedit_postClones an existing template into a new post titled "Copy of {Name}".
GET/templates/{id}/exportedit_postGenerates exportable JSON envelope containing version, metadata, and node data.
GET/kit-template/{eid}edit_postsResolves a base64url-encoded virtual kit ID (kit:, kitsec:, kitchrome:).
GET/templates/user-listsedit_postsRetrieves the current user's favorites and recently used template ID arrays.
POST/templates/favoriteedit_postsToggles template ID in user's _jalpi_tpl_favorites meta.
POST/templates/recentedit_postsPushes template ID to top of user's _jalpi_tpl_recent meta (max 30 items).
POST/import-websitemanage_optionsFull 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 via NodeWire.
  • 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:

FeatureStatusDescription
Cloud Template LibraryπŸ”’ Coming SoonCentralized cloud repository for syncing team templates across multiple WordPress installations without manual JSON file downloads.
Community Template HubπŸ”’ Coming SoonPublic repository for browsing and sharing community-designed section packs, headers, and footer blocks.
A/B Test Template VariantsπŸ”’ Coming SoonSave multi-variant section templates directly into the library for automated conversion rate split-testing.