Alex Heyd
Alex Heyd

Reputation: 1333

MODx Local Development Setup/System

I'm new to MODx, but am quite impressed with its power and flexibility. There's only one caveat, and I'm hoping it's just because I don't know any better.

I'm a frontend dev, and I'm used to building websites of all sizes. But I usually work with files and version control. How would I keep this paradigm with MODx?

From my poking around so far, the only way I found to use an IDE, is to keep static files with my code, to later on copy/paste into MODx Manager. Far from ideal.

I'm aware that a lot of people use an "include" snippet, to include snippets, chunks, etc. Does this work for MODx specific tags? For example, if I include a file as a snippet, and I have a template variable defined in there (or a resource link), would that be properly rendered?

Also, is there a performance hit using a snippet by including a file, vs having the snippet code entered into MODx Manager?

Bottom line, how do you develop sites on MODx? Where do you enter your code? Is there a feature like the "Import HTML" but for snippets and chunks? Is there a way to create new Templates, Documents, Chunks, TVs, etc. without going through the Manager?

Thanks in advance!

Upvotes: 1

Views: 1253

Answers (3)

There is VersionX for revolution that will allow you version control of chunks, snippets, resources and so on.

Upvotes: 1

Fishcake
Fishcake

Reputation: 10764

There is package called Auditor that will allow you to implement version control in Modx

EDIT

Sorry just noticed your question is tagged Revolution, Auditor is for Evo. I don't think there's a solution available yet although I believe it is on the Roadmap

Upvotes: 0

Sean Kimball
Sean Kimball

Reputation: 4494

there is a whole documentation site for developing in modx, http://rtfm.modx.com/display/revolution20/Home - though it mostly concerns extending it - not customization & modification. The short answer is no, there is no version control for your snippets & such, yes, you will have to maintain them manually. [I wish that was not the case]

Most of your php code will go into either a snippet or a plugin, and yes you can include static files in either of those resource types, no, I on't know if there is a performance gain/loss, but I would imagine "no" if your include is cache-able. for the includes you can do something like this:

include_once $modx->config['base_path'].'_path_to_my.php_';

-sean

Upvotes: 1

Related Questions