{"__v":39,"_id":"551e85bf610f400d00837dbd","api":{"auth":"required","params":[],"results":{"codes":[]},"settings":"","url":""},"body":"Cratejoy themes give you the scaffolding to create a fully customizable subscription or e-commerce store. Our themes are ready to serve your customers from the moment you publish them, but if you’re the kind of person who likes to stand apart from the pack, we’ve got you covered.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Theme Structure\"\n}\n[/block]\n# Minimal Theme Structure\n\nA minimal theme contains the following files:\n\n* images/\n* html/\n  * base.html\n  * subscribe.html\n  * index.html\n  * checkout.html\n  * customer/\n    * thank_you.html\n    * order.html\n    * login.html\n    * account.html\n    * edit.html\n    * forgot_password.html\n    * password_reset.html\n    * change_password.html\n  * shop/\n    * listing.html\n    * product.html\n* js/\n* css/\n* fonts/\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Theme Page Routes\"\n}\n[/block]\nCratejoy automatically translates urls to html templates on disk.\n\nSo for instance when a visitor to your site goes to _yourstore.com/subscribe_ Cratejoy automatically loads and displays the contents of the HTML file in your theme ``html/subscribe.html``\n\n# Default Routes\n\nThese are the default routes that are provided and expected on every Cratejoy theme.\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"URL\",\n    \"h-1\": \"Template File Rendered\",\n    \"0-0\": \"_yourstore.com_\",\n    \"0-1\": \"``/html/index.html``\",\n    \"1-0\": \"_yourstore.com/checkout_\",\n    \"1-1\": \"``/html/checkout.html``\",\n    \"2-0\": \"_yourstore.com/subscribe_\",\n    \"2-1\": \"``/html/subscribe.html``\",\n    \"3-0\": \"_yourstore.com/customer/login_\",\n    \"3-1\": \"``/html/customer/login.html``\",\n    \"4-0\": \"_yourstore.com/customer/order_\",\n    \"4-1\": \"``/html/customer/order.html``\",\n    \"5-0\": \"_yourstore.com/customer/thank_\\\\__you_\",\n    \"5-1\": \"``/html/customer/thank_you.html``\",\n    \"6-0\": \"_yourstore.com/customer/edit_\",\n    \"6-1\": \"``/html/customer/edit.html``\",\n    \"7-0\": \"_yourstore.com/customer/account_\",\n    \"7-1\": \"``/html/customer/account.html``\",\n    \"8-0\": \"_yourstore.com/customer/forgot_\\\\__password_\",\n    \"8-1\": \"``/html/customer/forgot_password.html``\",\n    \"9-0\": \"_yourstore.com/customer/password_\\\\__reset_\",\n    \"9-1\": \"``/html/customer/password_reset.html``\",\n    \"10-0\": \"_yourstore.com/customer/change_\\\\__password_\",\n    \"10-1\": \"``/html/customer/change_password.html``\",\n    \"11-0\": \"_yourstore.com/shop_\",\n    \"11-1\": \"``/html/shop/listing.html``\",\n    \"12-0\": \"_yourstore.com/shop/all/_\",\n    \"12-1\": \"``/html/shop/listing.html``\"\n  },\n  \"cols\": 2,\n  \"rows\": 13\n}\n[/block]\n# Arguments\n\nCertain routes accept arguments which modify the behavior of the page. Of note are the subscribe and product routes. Their arguments specify which products are loaded and displayed in the template file.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"_yourstore.com/subscribe/2353_\\\\__Basic+Plan_\",\n    \"h-0\": \"URL\",\n    \"h-1\": \"Arguments\",\n    \"1-0\": \"_yourstore.com/shop/product/44941_\\\\__Product+One_\",\n    \"h-2\": \"Template File Rendered\",\n    \"0-1\": \"2353_Basic+Plan\",\n    \"0-2\": \"``/html/subscribe.html``\",\n    \"1-1\": \"44941_Product+One\",\n    \"0-3\": \"2353_Basic+Plan\",\n    \"1-2\": \"``/html/shop/product.html``\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]","category":"551e85bf610f400d00837dbb","createdAt":"2015-04-03T12:21:19.980Z","excerpt":"This document describes the overall file structure of a Cratejoy theme","githubsync":"","hidden":false,"isReference":false,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"551e85be610f400d00837db7","slug":"getting-started","sync_unique":"","title":"Theme Structure","type":"basic","updates":[],"user":"551e85707ca3030d00be0c07","version":"551e85be610f400d00837dba","childrenPages":[]}

Theme Structure

This document describes the overall file structure of a Cratejoy theme

Cratejoy themes give you the scaffolding to create a fully customizable subscription or e-commerce store. Our themes are ready to serve your customers from the moment you publish them, but if you’re the kind of person who likes to stand apart from the pack, we’ve got you covered. [block:api-header] { "type": "basic", "title": "Theme Structure" } [/block] # Minimal Theme Structure A minimal theme contains the following files: * images/ * html/ * base.html * subscribe.html * index.html * checkout.html * customer/ * thank_you.html * order.html * login.html * account.html * edit.html * forgot_password.html * password_reset.html * change_password.html * shop/ * listing.html * product.html * js/ * css/ * fonts/ [block:api-header] { "type": "basic", "title": "Theme Page Routes" } [/block] Cratejoy automatically translates urls to html templates on disk. So for instance when a visitor to your site goes to _yourstore.com/subscribe_ Cratejoy automatically loads and displays the contents of the HTML file in your theme ``html/subscribe.html`` # Default Routes These are the default routes that are provided and expected on every Cratejoy theme. [block:parameters] { "data": { "h-0": "URL", "h-1": "Template File Rendered", "0-0": "_yourstore.com_", "0-1": "``/html/index.html``", "1-0": "_yourstore.com/checkout_", "1-1": "``/html/checkout.html``", "2-0": "_yourstore.com/subscribe_", "2-1": "``/html/subscribe.html``", "3-0": "_yourstore.com/customer/login_", "3-1": "``/html/customer/login.html``", "4-0": "_yourstore.com/customer/order_", "4-1": "``/html/customer/order.html``", "5-0": "_yourstore.com/customer/thank_\\__you_", "5-1": "``/html/customer/thank_you.html``", "6-0": "_yourstore.com/customer/edit_", "6-1": "``/html/customer/edit.html``", "7-0": "_yourstore.com/customer/account_", "7-1": "``/html/customer/account.html``", "8-0": "_yourstore.com/customer/forgot_\\__password_", "8-1": "``/html/customer/forgot_password.html``", "9-0": "_yourstore.com/customer/password_\\__reset_", "9-1": "``/html/customer/password_reset.html``", "10-0": "_yourstore.com/customer/change_\\__password_", "10-1": "``/html/customer/change_password.html``", "11-0": "_yourstore.com/shop_", "11-1": "``/html/shop/listing.html``", "12-0": "_yourstore.com/shop/all/_", "12-1": "``/html/shop/listing.html``" }, "cols": 2, "rows": 13 } [/block] # Arguments Certain routes accept arguments which modify the behavior of the page. Of note are the subscribe and product routes. Their arguments specify which products are loaded and displayed in the template file. [block:parameters] { "data": { "0-0": "_yourstore.com/subscribe/2353_\\__Basic+Plan_", "h-0": "URL", "h-1": "Arguments", "1-0": "_yourstore.com/shop/product/44941_\\__Product+One_", "h-2": "Template File Rendered", "0-1": "2353_Basic+Plan", "0-2": "``/html/subscribe.html``", "1-1": "44941_Product+One", "0-3": "2353_Basic+Plan", "1-2": "``/html/shop/product.html``" }, "cols": 3, "rows": 2 } [/block]