/atom-modx-revolution

MODX Revolution support in Atom

Primary LanguageCSSMIT LicenseMIT

MODX Revolution support in Atom

Build Status Dependency Status

Atom.io | GitHub

apm install modx-revolution

##Features

####Snippets

Snippets for Template Tags in .html & .tpl, modX and xPDO Class methods in .php.

MODX Class Snippets

####Descriptions & Documentation links

Each modX and xPDO class has a description and link to a full documentation.

Descriptions and documentation links

####Autocomplete & Syntax Highlighting

To enable syntax highlighting, switch to HTML (MODX) syntax.

Autocomplete & Syntax highlighting

####Theme and Transport Package scaffolding

Open Command Palette and search for MODX Revolution. There is two options available:

  • Scaffold Transport Package
  • Scaffold Theme

Transport Package template (modExtra) originally developed by Shaun McCormick. Please, read the modExtra documentation before using it. There is also a relevant page at MODX RTFM.

####MODX Installation

The purpose of this is to provide fast and easy method for installing MODX locally without leaving the editor.

Requirements

  • git*
  • php*
  • Some server environment (MySQL, Apache2, etc)

* Both should be available in your PATH.
date.timezone must be set in php.ini.

How To

  1. Open Command Palette and run Install MODX
  2. Enter path where MODX should be installed
  3. Edit config.yml, save it
  4. For CLI installation, just click Install and wait for the success message. Then, open localhost/path/to/modx/manager in your browser.
    If you want to use a web-based installation, click Run Build and install MODX via localhost/path/to/modx/setup.

How it works

  • Pulls MODX from the official repository
  • Duplicates sample config files
  • Duplicates setup config
  • Opens setup config for edit
  • Installs MODX

MODX Git Installation docs
MODX CLI Installation docs

NOTE: This one is still in beta. If you found any bugs, please, submit an issue.

###Snippet Triggers

Snippet Trigger Scope
$modx-> $ .text.html.php
$xpdo-> $p .text.html.php
MODX_API_MODE mapi .text.html.php
&property=`value` & .text.html.basic
:filter=`value` : .text.html.basic
@propertyset @ .text.html.basic
[[*tag]] mt .text.html.basic

MODX_API_MODE

define('MODX_API_MODE', true);
require_once('/path/to/index.php');
$modx = new modX();
$modx->initialize('mgr');

Notes

  • In case of issues with Emmet, use Ctrl+Space shortcut to toggle snippet.
  • Because of large amount of files in Theme and Transport Package templates, there in no Project or Author Name placeholders for now. You have to manually replace them after scaffolding.