← Back to Documentation Template System Guide

🎨 Template System Guide

Understanding how Base47's template system works

🎯 What Are Templates?

Templates in Base47 are complete HTML pages that get converted into WordPress shortcodes. Each template includes:

  • HTML structure - The page layout and content
  • CSS styling - Visual design and responsive layout
  • JavaScript - Interactive functionality
  • Assets - Images, fonts, and other resources

📁 Template Structure

Each template follows this structure:

Template-Name/
├── index.html          # Main template file
├── style.css           # Template styles
├── script.js           # Template JavaScript
├── theme.json          # Template metadata
├── thumbnail.png       # Preview image
└── assets/
    ├── images/         # Template images
    ├── fonts/          # Custom fonts
    └── icons/          # Icon files

🔄 How Templates Become Shortcodes

Automatic Discovery

Base47 automatically scans for template folders and:

  1. Finds templates in your theme folders
  2. Generates shortcodes for each template
  3. Creates preview images automatically
  4. Registers with WordPress for use anywhere

Shortcode Generation

Each template gets a unique shortcode:

[base47_agency_homepage]     # Agency homepage template
[base47_ecommerce_product]   # E-commerce product page
[base47_restaurant_menu]     # Restaurant menu template

🎨 Template Categories

Agency Templates (7)

Professional business websites with hero sections, team pages, portfolios, and contact forms.

E-commerce Templates (5)

Online store layouts with product listings, detail pages, shopping cart, and checkout.

Restaurant Templates (5)

Food & dining websites with menu displays, galleries, reservations, and location maps.

Fitness Templates (5)

Gym and wellness sites with class schedules, trainers, membership pricing, and sign-up forms.

Real Estate Templates (5)

Property websites with listings, agent profiles, property details, and search functionality.

Education Templates (5)

Schools and courses with instructor profiles, course catalogs, and enrollment systems.

App Templates (5)

App landing pages with feature showcases, download links, and support sections.

Event Templates (5)

Events and conferences with speaker profiles, schedules, and ticket purchasing.

Medical Templates (5)

Healthcare sites with service listings, doctor profiles, and appointment booking.

🖥️ Canvas Mode

What is Canvas Mode?

Canvas mode outputs pure HTML without your WordPress theme wrapper. Perfect for:

  • Landing pages - Clean, focused pages
  • Pop-ups - Standalone content
  • Embedded content - Use in iframes
  • Print layouts - Printer-friendly pages

Using Canvas Mode

Method 1: URL Parameter

https://yoursite.com/page/?canvas=1

Method 2: Shortcode Parameter

[base47_template canvas="true"]

Method 3: Template Setting

Enable canvas mode by default in template settings.

🎛️ Template Management

Theme Manager

Control which template sets are active:

  1. Go to Base47 > Theme Manager
  2. Use toggle switches to enable/disable sets
  3. Only active sets show in shortcodes list
  4. Bulk enable/disable multiple sets

Template Organization

Templates are organized by:

  • Categories - Business type (Agency, E-commerce, etc.)
  • Status - Active/inactive
  • Usage - Most used templates first
  • Alphabetical - A-Z sorting

🔧 Template Customization

Live Editor

Edit templates directly in WordPress:

  1. Go to Base47 > Live Editor
  2. Select a template to edit
  3. Make changes in real-time
  4. Preview changes instantly
  5. Save when ready

Custom CSS/JS

Add custom code to templates:

/* Custom CSS */
.my-custom-class {
    color: #ff6b35;
    font-weight: bold;
}
// Custom JavaScript
document.addEventListener('DOMContentLoaded', function() {
    console.log('Template loaded!');
});

📱 Responsive Design

Built-in Responsiveness

All templates include:

  • Mobile-first design - Optimized for mobile
  • Flexible layouts - Adapt to any screen size
  • Touch-friendly - Easy mobile navigation
  • Fast loading - Optimized for mobile networks

Breakpoints

Templates use these responsive breakpoints:

  • Mobile: 320px - 767px
  • Tablet: 768px - 1023px
  • Desktop: 1024px+

⚡ Performance Features

Optimization

Templates are optimized for speed:

  • Minified CSS/JS - Smaller file sizes
  • Optimized images - Compressed for web
  • Lazy loading - Load content as needed
  • CDN ready - External asset support

Caching

Built-in caching system:

  • Template caching - Faster loading
  • Asset caching - Reduced server load
  • Browser caching - Better user experience

🎯 Best Practices

Template Usage

  1. Choose the right template for your content type
  2. Customize carefully - Don't break responsive design
  3. Test on mobile - Always check mobile appearance
  4. Use canvas mode for landing pages
  5. Keep it simple - Don't over-customize

Performance Tips

  1. Enable caching in settings
  2. Optimize images before uploading
  3. Minimize custom code - Keep it lightweight
  4. Use CDN for external assets
  5. Test loading speed regularly

📚 Next Steps

🎨 Master the template system and create beautiful websites with ease!