Page 1 of 1

File-based design and development workflows

Posted: Fri Jan 05, 2018 11:23 am
by HarmO
In the announcement of the CMSMS 2.2 Update mentioned that cmsms is now supporting file-based design and development workflows, using the assets folder.

Fantastic news, but i can't seem to find more information on this.

What is the structure to use in an external template or how to link it to a design in the CMS installation?

Re: File-based design and development workflows

Posted: Fri Jan 05, 2018 12:19 pm
by scooper
You still manage templates and stylesheets under the Design Manager, but when you edit a template etc there's an option under the 'Advanced' tab to export a template file.

That creates a template file in the /assets/templates folder of your site (or assets/css for stylesheets).

Those files are then watched and any changes you make to them are imported automatically.

You can move the templates back into the database using the same option under the 'Advanced' tab if you want to be able to change things in the CMS admin again.

The way we work is by developing on a local dev machine and then pushing the files to the live server which works well for us. You could edit the files directly on the server using Fuse or something similar if you wanted.

But as a general point - hooray - file based templating is great.

Re: File-based design and development workflows

Posted: Fri Jan 05, 2018 12:55 pm
by Rolf
You can also use the assets folder for more fun.

I.e. put PHP code you previous added in a UDT in a file and place that in the folder assets/plugins.
Add all default template files/images in assets/themes/theme-name.

Create a new website, simply copy the assets folder from your local drive to the server and all is there and works.

Re: File-based design and development workflows

Posted: Fri Jan 05, 2018 2:51 pm
by HarmO
thanks for the reply!
it is somewhat clearer now, i'll give it a go in my new project.

Re: File-based design and development workflows

Posted: Fri Jan 05, 2018 4:39 pm
by calguy1000
If you are customizing module templates... they now go under

/assets/module_custom/<module_name>/templates

and customized lang files now go under

/assets/module_custom/<module_name>/lang

So now MOST of your customizations (some modules don't support it yet) go under /assets and you an use your favorite editor and source code control.

An added hint:
for modules that do not support file based templates, or use templates for email messages, or don't use Designmanager templates yet (like SelfRegistration). you can simply copy the template code from the textarea to a file under /assets/templates. i.e: /assets/templates/selfreg_registration_1.tpl and replace the contents of the textarea with {include file='selfreg_registration_1.tpl'}

Re: File-based design and development workflows

Posted: Thu Feb 01, 2018 1:18 pm
by HarmO
Thanks Calguy,

your reply makes things much clearer for me.
Hopefully this form post will help others users in figuring it out.

It worked fine in my latest project.