Changeset 57 contains the following improvements: * Updated db/setup.rb. Option parsing has been improved and you can now select a template for your new Radiant database. * Added an export controller to make it easier to create templates. It exports your database in YAML format. Simply hit /admin/export/. http://dev.radiantcms.org/radiant/changeset/57 If you examine the db/templates directory now you will see a couple of simple YAML templates which can be used to generate the initial database for a Radiant install. I've included three default templates: 1. An empty template (to create a blank database) 2. A bare bones template (the same as what you have seen before) 3. A styled blog template I just finished coding option #3 today. It demonstrates a lot of the advanced features of Radiant and also looks nice. I would love to see more options for people just getting started with Radiant. If you are a talented designer and I'd like to invite you to participate in an informal contest of sorts. I'm looking for two basic templates: * A blog template * A simple company web site template Here's the catch: you can't use images in the design at all. (Since Radiant doesn't have the attachments system yet it wouldn't make sense to put a lot of additional images in the public/images directory.) If you submit a template that I like it will have a shot at being included in the core distribution. The easiest way to create a template is to setup a Radiant database the way you like it and then go to /admin/export/ to get the YAML for it. Then take the YAML and paste it into a template file in the db/templates directory. You will need to modify the generated YAML a bit, but it should be enough to get you started. -- John Long http://wiseheartdesign.com
on 2006-06-10 08:51
on 2006-06-30 07:01
> The easiest way to create a template is to setup a Radiant database the > way you like it and then go to /admin/export/ to get the YAML for it. > Then take the YAML and paste it into a template file in the db/templates > directory. You will need to modify the generated YAML a bit, but it > should be enough to get you started. I've just finished a template, and now I am having one hell of a [not] good time trying to get the it to work. I was wondering, why not just use sql dumps for templates?
on 2006-06-30 09:11
Scratch that question, and answered it for myself.
on 2006-06-30 15:15
Bernard Yu wrote: > Scratch that question, and answered it for myself. > What was the answer? :-) -- John Long http://wiseheartdesign.com
on 2006-06-30 22:16
John W. Long wrote: > Bernard Yu wrote: >> Scratch that question, and answered it for myself. >> > > What was the answer? :-) > > -- > John Long > http://wiseheartdesign.com It'd be trouble for anyone trying to use a non-SQL database. Though I suppose that wouldn't really happen that often. But for the .yml files, I'm having a hell of a time trying to get the thing to work properly and I haven't the foggiest clue why. As it is, I'm finishing with fixing some problems I didn't notice with the CSS print file, and I'm not looking foward to going through and making it pretty again. it keeps coming up with yaml.rb errors every other line.
on 2006-07-01 04:07
If you make it work, it would be nice if you can post your experience, I haven't been trying lately but I couldn't get a template to work neither.
on 2006-07-03 00:18
Well then, I'd like to submit a (company) website template of sorts for the contest... I present <a href="http://radtest.enguindesign.com">Handsome in Blue</a>. It's not just a blank template, it's a lesson of sorts as well for those new to Radiant as well as managing websites. The <a href="http://enguindesign.com/sites/radiant-template/han... is a heavy weighing in at 41k, but it has separate stylesheets for screen, print, and handheld devices, (also has some goodies for text browsers). It uses XHTML-Strict, the CSS validates beautifully, and takes advantage of a lot of Radius's features. ----- Excuse me while I sob like a little baby I figured it out...the hard way. I got to thinking, this is Ruby...therefore spaces matter. With that in mind, I'll outline the structure of the yaml file. name: [name of template] description: [description for template] records: Layouts: 1: name: [name of layout] id: 1 content: | This is where the body of your template goes the white space must be at least one space beyond the beginning of its container, and remember no indents that's cheating. 2: name: [name of second layout] id: 2 Content: | Snippets: 1: name: [you get the point] id: 1 content: | ... Pages: 1: slug: title: breadcrumb: id: status_id: layout_id: [id of layout that should apply to it] parent_id: [id of parent] PageParts: 1: name: page_id: [id of page this part applies to] id: 1 content: | I hate myself, a lot ----- You basically have to give the same level container the same ammount of white-space (so "layouts," "Snippets," "Pages," and "PageParts" all have 2spaces, the ID numbers all have 4 spaces, etc). Hopefully I explained that well enough...once you figure it out, it's really easy. Good luck!