Home » Documentation » Configuration and Usage » Making Site Templates

Making Site Templates

Imagine a site create by a developer but managed by a business owner. The developer can do anything s/he wants on templates, but the business owner doesn't want to edit, or even know, HTML. With most database-driven sites, this is handled by storing everything in a database and rendering pages using fixed layout templates. This is fine if the business owner doesn't mind having 55 identical product pages, and has been the standard until now.

But, what if some items have three pictures, others have only one, and a few don't even have a picture? What if the business owner wants to put the pictures on the top of the page on some pages, and at the bottom for some others? What if the site designer is making a generic template, and doesn't even know the business owner - s/he has no idea what the owner might want? (Think Template Monster.) There's a limit to how much of this a site designer can envision and code for, and no matter what s/he does there will always be something the user might want that the template doesn't do. (It also seems silly, given that you're going to the trouble of implementing a CMS, to lock the business owner back into static content layouts at the last minute.)

KiweeCommerce thus uses two types of templates to render product pages, Page Templates and Product Templates. Page Templates are what they sound like - MODx templates that are used to render pages. When a new product page is created, Kiwee will select this template as the page's layout. As usual, the developer should put nav bar, site style, general site layout, and similar things here.

KiweeCommerce then goes one step further by supporting content layouts that are used when the user wants to edit the "content" panel on the page. This integrates with TinyMCE's drop-down list of "layouts". These are chunks that contain pre-formatted blocks that do basically what templates do, but allow site owners to edit things on the fly with less risk of screwing up the layout for the entire page. Using TinyMCE, the site owner can then insert as many pictures as s/he likes, put in tables for things like product features, and do other rich-editing things that a purely database-driven site would never support.

 

 

ITema - "Making IT Simple"

Eternity Web - Web Programming and Design