File-based design and development workflows

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

File-based design and development workflows

Post 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?
Kind regards,
HarmO
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm
Location: Marlow, UK

Re: File-based design and development workflows

Post 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.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: File-based design and development workflows

Post 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.
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

Re: File-based design and development workflows

Post by HarmO »

thanks for the reply!
it is somewhat clearer now, i'll give it a go in my new project.
Kind regards,
HarmO
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: File-based design and development workflows

Post 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'}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
HarmO
Power Poster
Power Poster
Posts: 251
Joined: Thu Jan 26, 2012 3:22 pm
Location: Belgium

Re: File-based design and development workflows

Post 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.
Kind regards,
HarmO
Locked

Return to “CMSMS Core”