
Features: Wrappers
Learn about Cartooga's HTML Wrapper System
Understanding Wrappers
A Wrapper is an HTML template that "wraps" itself around other pages within the content management system, and is a central point in how the Cartooga e-commerce platform "thinks". Wrappers are used to maintain a consistent look and feel throughout your site, simplify the process of creating new web pages, and allow you to update the look of your site without having to edit every page. All of the web pages you create can be assigned a wrapper, and when the page is accessed in a web browser the wrapper wraps around the content and generates the full page. For example, the HTML for a wrapper would look something like this:
<html>
<head>
<title>!~PAGETITLE~!</title>
<meta name="keywords" content="!~META-KEYWORDS~!">
<meta name="description" content="!~META-DESCRIPTION~!">
<link type="text/css" media="screen" rel="stylesheet" href="/css/style.css">
</head>
<body>
This content will appear above the page.
!~SERVER_PAGE_CONTENT~!
This content will appear below the page.
</body>
</html>
See the SmartTags embedded into the Wrapper? These tell the system to dynamically insert content relevant to the page, logged in user, or other related data. When you're editing pages that have a wrapper assigned, you'll see a
field where you can enter the page title, description, and keywords for
the page. These will automatically be inserted when the server renders
the page using the wrapper.<head>
<title>!~PAGETITLE~!</title>
<meta name="keywords" content="!~META-KEYWORDS~!">
<meta name="description" content="!~META-DESCRIPTION~!">
<link type="text/css" media="screen" rel="stylesheet" href="/css/style.css">
</head>
<body>
This content will appear above the page.
!~SERVER_PAGE_CONTENT~!
This content will appear below the page.
</body>
</html>
Lets say the page we're creating is called /example-page.html, and contains the following HTML:
<p>
<img align="right" src="/images/example.gif">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget mi ante, eget luctus dui. Duis quis augue urna. Donec adipiscing dolor libero. Nam auctor, lectus sed euismod pretium, justo ante ultricies nulla, at condimentum leo urna at elit. Sed leo urna, pulvinar id interdum non, sodales a odio. Morbi accumsan purus eget tellus blandit ultrices. Morbi magna augue, aliquam in egestas sed, mattis sed lorem. Nullam dolor lectus, porttitor sed tincidunt porta, mollis id justo. Praesent accumsan blandit mollis. Maecenas adipiscing massa et risus tincidunt eget mollis lorem posuere. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus sit amet risus id enim dapibus dignissim a ut purus. Phasellus in nibh turpis, vitae placerat ligula.
</p>
Now whenever someone accesses /example-page.html in their web browser, the server will take the HTML code for the page and insert it into the wrapper where the !~SERVER_PAGE_CONTENT~! tag appears.<img align="right" src="/images/example.gif">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget mi ante, eget luctus dui. Duis quis augue urna. Donec adipiscing dolor libero. Nam auctor, lectus sed euismod pretium, justo ante ultricies nulla, at condimentum leo urna at elit. Sed leo urna, pulvinar id interdum non, sodales a odio. Morbi accumsan purus eget tellus blandit ultrices. Morbi magna augue, aliquam in egestas sed, mattis sed lorem. Nullam dolor lectus, porttitor sed tincidunt porta, mollis id justo. Praesent accumsan blandit mollis. Maecenas adipiscing massa et risus tincidunt eget mollis lorem posuere. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus sit amet risus id enim dapibus dignissim a ut purus. Phasellus in nibh turpis, vitae placerat ligula.
</p>
When the server generates the page, the output HTML would look like this:
<html>
<head>
<title>Example Page Title</title>
<meta name="keywords" content="example, page, keywords">
<meta name="description" content="This is an example of the page description">
<link type="text/css" media="screen" rel="stylesheet" href="/css/style.css">
</head>
<body>
This content will appear above the page.
<p>
<img align="right" src="/images/example.gif">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget mi ante, eget luctus dui. Duis quis augue urna. Donec adipiscing dolor libero. Nam auctor, lectus sed euismod pretium, justo ante ultricies nulla, at condimentum leo urna at elit. Sed leo urna, pulvinar id interdum non, sodales a odio. Morbi accumsan purus eget tellus blandit ultrices. Morbi magna augue, aliquam in egestas sed, mattis sed lorem. Nullam dolor lectus, porttitor sed tincidunt porta, mollis id justo. Praesent accumsan blandit mollis. Maecenas adipiscing massa et risus tincidunt eget mollis lorem posuere. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus sit amet risus id enim dapibus dignissim a ut purus. Phasellus in nibh turpis, vitae placerat ligula.
</p>
This content will appear below the page.
</body>
</html>
That's all there is to it! You can create as many wrappers as you want, and assign any wrapper you want to any page and it will wrap itself around whatever content is inside. Wrappers work on both managed pages like Category lists, products, and search results, and on custom pages you create yourself.<head>
<title>Example Page Title</title>
<meta name="keywords" content="example, page, keywords">
<meta name="description" content="This is an example of the page description">
<link type="text/css" media="screen" rel="stylesheet" href="/css/style.css">
</head>
<body>
This content will appear above the page.
<p>
<img align="right" src="/images/example.gif">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget mi ante, eget luctus dui. Duis quis augue urna. Donec adipiscing dolor libero. Nam auctor, lectus sed euismod pretium, justo ante ultricies nulla, at condimentum leo urna at elit. Sed leo urna, pulvinar id interdum non, sodales a odio. Morbi accumsan purus eget tellus blandit ultrices. Morbi magna augue, aliquam in egestas sed, mattis sed lorem. Nullam dolor lectus, porttitor sed tincidunt porta, mollis id justo. Praesent accumsan blandit mollis. Maecenas adipiscing massa et risus tincidunt eget mollis lorem posuere. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Phasellus sit amet risus id enim dapibus dignissim a ut purus. Phasellus in nibh turpis, vitae placerat ligula.
</p>
This content will appear below the page.
</body>
</html>
We also have a library of website themes which are ready-to-run layouts for your store that can be installed with a single click.
Web Design Features
- Designers & Developers
- Content Management
Wrappers
SmartTags - Search Engine Friendly
- Import Products and Web Pages
- Advanced Product Imaging
Back-End Features
- Inventory Management
- Multi-Tiered Pricing for Products
- Split Payments and Subscriptions
- Deal of the Day
- Real-Time Shipping Calculations
- Real-Time Credit Card Processing
- Multi-state Sales Tax Tables
- Restrict Products by State or Country
- Built-in Affiliate Program
- Order Fulfillment Services
- Plastic Gift Cards
- Allow User Uploads or Text for Products
- Sell Downloadable Products
- Up-Sell Engine
- Quote Management
