Editing templates

5 posts by 3 authors in: Forums > CMS Builder
Last Post: November 12, 2010   (RSS)

Hi -
I've just created a new template by copying an 'articles' section into the 'schemaPresets' folder.

Is it possible to edit the templates directly to, for example, add new fields to it, or do I just have to copy a new updated file into this folder?

Regards, Steve

Re: [steve_e] Editing templates

By Chris - November 11, 2010

Hi Steve,

You can edit your schemaPresets directly with a text editor, but that's not exactly recommended!

You'll probably find it easier to modify a schemaPreset by moving it to schema/, working with it with CMS Builder's Section Editor, then moving it back to schemaPresets/. For this reason, it would be useful to have your preset's filename be different than any of your existing sections. You can safely rename schemaPreset files.

The only weirdness with this approach will be that you'll have an extra table in your MySQL database named after your schemaPreset. You can safely ignore it. :)

I hope this helps! Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Editing templates

No questions Chris, thanks - that sounds good!

Re: [gkornbluth] Editing templates

Thanks Jerry I missed your reply. That's more or less what I'll do. I want to have an 'Articles' template with a large number of standard fields, which I can then use to create an indeterminate number of 'types' of article. Thing is I keep thinking of extra fields I'd like to put in this template, which is why I asked this question.

One thing that occurred to me is that it might be quite smart to have some types of templates that will automatically update or add fields in the sections that were created from them, which might save some repetition when you're adding fields at a later date.

But I can also see where that might cause unexpected problems...