---
title: "Sub-templates"
description: "Since Version 3, J2Store comes with a sub-templating system that is very similar to the K2 content construction kit’s system.Sub-templates allows store..."
url: "https://docs.j2commerce.com/developer-guide/sub-templates"
markdown_url: "https://docs.j2commerce.com/developer-guide/sub-templates.md"
last_updated: "2026-10-23T02:33:38+00:00"
version: "J2Store 4"
breadcrumbs:
  - title: "Home"
    url: "https://docs.j2commerce.com/"
  - title: "Developer Guide"
    url: "https://docs.j2commerce.com/developer-guide"
  - title: "Sub-templates"
    url: "https://docs.j2commerce.com/developer-guide/sub-templates"
---

# Sub-templates

Since Version 3, J2Store comes with a sub-templating system that is very similar to the K2 content construction kit’s system.Sub-templates allows store owners to have finer control over their product layouts. They can move the pieces around and have a unique design for their store front.

**IMPORTANT: Sub-templates work only with J2Store Product List Layout. They will not work with any other layouts.**

## Default sub-templates

The J2Store package by default comes with two sub-templates

1. Default (supports Bootstrap 2)
2. Bootstrap3 (supports Bootstrap 3)

The sub-templates are located in the following location: /components/com_j2store/templates

You can take one of these as your base to create your own sub-template. The best way is by copying an existing sub-template

## Creating a sub-template

Let us create a sub-template called: foo

**Step 1:**

Using a FTP client or your hosting cpanel’s File manager, go to /components/com_j2store/templates

Copy the **default** folder (copy the entire folder)

to

/templates//html/com_j2store/templates/default

**Step 2:**

Now go to /templates//html/com_j2store/templates/ folder

You will see the folder: default.

Rename it as: foo

**Step 3**

Now go to /templates//html/com_j2store/templates/foo

You will a list of files

1. files starting with default\_\* = controls the list view
2. files starting with view\_\* = controls the detail product view

There are four master files (one for each product type)

1. default_simple.php
2. default_configurable.php
3. default_variable.php
4. default_downlodable.php

Similarly, you will find the files for detail single product view (view_simple.php, view_configurable.php, view_variable.php and view_downlodable.php)

You will have to edit these files and organize your layout. These master files in turn will call child templates as well (which are common for many product types)

**Video Tutorial:**

[![Watch the video](https://img.youtube.com/vi/VltGFjvABzE/hqdefault.jpg)](https://www.youtube.com/watch?v=VltGFjvABzE)
