Skip to content

Instantly share code, notes, and snippets.

@Deesen
Last active December 8, 2016 11:39
Show Gist options
  • Save Deesen/d57df3867c4a4c9efc5fb480c85633c8 to your computer and use it in GitHub Desktop.
Save Deesen/d57df3867c4a4c9efc5fb480c85633c8 to your computer and use it in GitHub Desktop.

#Release 1.2 on 01.12.2016

We are happy to announce, with over 1250+ commits, another major release of MODX Evolution. The changes are too big to just iterate to version 1.1.1, so we decided to move on to version 1.2.

First of all, all latest security-fixes are included and up to date. And we want to introduce a new tool called "Evocheck", which is able to assist you in good or bad issues. It can be found within Extras.

screenshot_1

##MODX Evolution 1.2 credits go out to (ordered by number of contributions)

#####Special thanks go out to all translators and testers!

##New Features and Changes

###General

  • New default Theme MODxRE2
  • TinyMCE4 is now default richtext-editor, featuring
    • custom themes (every official parameter can be set)
    • turning introtext into richtext-editor
    • different themes per Richtext-TV
    • frontpage inline-editing
    • improved custom-parameters
  • Revised lock-mechanismn for locking multiple resources and elements when editing

###New Starter-Template based on Bootstrap3 demo-tpl

###Resource-Tree

Moved "Sort menuindex" from DocManager to Resource-tree (modxcms/evolution#618, modxcms/evolution#636)

  • Sort Resources in Root: Click Button "Sort menu index" on top of resource-tree
  • Sort Resources of Parent Resource: Right mouse-click on parent, then choose "Sort menu index"

New "Manage Elements" Buttons (modxcms/evolution#669)
You can quick-access elements, files and images now directly from ressource-tree. Use Shift-Mouseclick to open multiple windows/elements. Permission is granted using new roles "assets_images" and "assets_files".

Remember last sort-options (modxcms/evolution#618, modxcms/evolution#636)
The ressource-tree stores now the last set sort-options per user to database (Sort by, Asc/Desc, Display-Name). At manager log-in, last settings of each user get restored.

New plugin "ElementsInTree" (github.com/pmfx)
This plugin has been added to default installation. With ElementsInTree user gets additional access to all Elements and Modules beside resource-tree.

Use Shift-Mouseclick to collapse/expand all categories. Collapsed states per category will be remembered via browser´s localStorage.

###MODX Tags

New Modifiers/Filters in Core (PHx)
Can be disabled in MODX-configuration. More infos at modxcms/evolution#623

Snippet - Shortcut param = true

[[snippetName?param1&param2]]
 
  will automatically be handled as
 
[[snippetName?param1=`1`&param2=`1`]]
 
  while param=`` will still be handled as empty value.

Output value of $_GET, $_POST, $_COOKIE, $_SERVER, $_SESSION

[!$_SERVER['REQUEST_TIME']:dateFormat='Y'!]

New Conditional Tags <@IF>, <@ELSEIF>, <@ELSE>, <@ENDIF> and Modifiers

Can be enabled/disabled via Configuration -> "Enable Filters". More examples at modxcms/evolution#622 and modxcms/evolution#623. Performance is good because it does not parse the block which is judged false. Example:

[*longtitle:ifempty=[*pagetitle*]*]  
                                        
<@IF:[*id:is('[(site_start)]')*]>
Top page
<@ELSE>
Sub page
<@ENDIF>

In combination with $_GET :

<@IF:[!$_GET['value']:preg('/^[0-9]+$/')!]>
Value is numeric.
<@ELSE>
Value is not numeric.
<@ENDIF>

UltimateParent

[[UltimateParent:is=`8`:then=`8`:else=`11`]]
                                   
<@IF:[[UltimateParent:is=8]]>
8
<@ELSE>
11
<@ENDIF>

Combination with Cross-references (modxcms/evolution@956c9ae)

<@IF:[*id@ultimateparent:is=8*]>
8
<@ELSE>
11
<@ENDIF>

New Comment Tag
Comment-Tags will be completely removed from output. More infos at modxcms/evolution#680. Example:

<!--@- This is a comment -@-->
                     
<!--@- Or HTML-Code / Snippets etc you want to disable temporarily -@-->

New Chunk Parameters
It is possible to pass properties/values to a chunk. More infos at modxcms/evolution#625. Example:

Chunk:

<h1>[+title+]</h1>
<p>[+body+]</p>

Call:

{{chunkName? &title='First post' &body='Hello World!'}}

File-binded Templates via @INCLUDE
Templates can be included via @INCLUDE using external PHP- & HTML-files. More infos at modxcms/evolution#627. Examples:

HTML Template:

@INCLUDE:assets/templates/mydesign/template.html

PHP Template:

@INCLUDE:assets/templates/mydesign/template.inc.php

template.inc.php :

switch($modx->documentIdentifier) {
    case $modx->config['site_start']:
        return file_get_contents('assets/templates/mydesign/top.html');
    default:
        return file_get_contents('assets/templates/mydesign/page.html');
}

Snippet-calls improved and supporting Modifiers

[[snippetName]]
  
[[snippet Name]]
     
[[snippetName?param=`value`]]
 
[[snippet Name?param=`value`]]
 
[[snippetName? &param=`value`]]
 
[[snippetName ? &param=`value`]]
 
[[snippetName &param=`value`]]
 
[[snippetName?
    &param=`value`
]]
 
[[snippetName
    &param=`value`
]]
 
[[snippet Name?
    &param=`value`
]]
 
[[snippetName?param]]
 
[[snippetName:modifier]]
 
[[snippetName:modifier?param=`value`]]
 
[[snippetName:modifier ?
    &param=`value`
]]
 
[[snippetName:modifier
    &param=`value`
]]
 
[[snippetName:modifier=`option`
    &param=`value`
]]
 
[[snippetName:modifier(option)
    &param=`value`
]]
 
[[snippetName:modifier('option')
    &param=`value`
]]
 
[[snippetName:modifier("option")
    &param=`value`
]]
 
[[snippetName:modifier(`option`)
    &param=`value`
]]

Wayfinder Debug-Mode
More infos at modxcms/evolution#719

[[Wayfinder?debug]]

###New Manager Roles

change_resourcetype
A user with this permission can change resource-type (webpage/weblink). More infos at modxcms/evolution#531

assets_images, assets_files
Controls the display of 2 new buttons in resource-tree and grants/blocks access to KCFinder. More infos at modxcms/evolution#681

display_locks
This permission control the display of locks inside resource-tree. When having permission "remove_locks", locks can be released by a single click.

###Template-Variables

@BINDINGS providing TV-values
[*tv_name*] will be replaced by its value taken from actual resource. Beware of SQL-Errors in case no or wrong value is given (set a reasonable default-value to avoid errors). More infos at modxcms/evolution#699. Example:

@SELECT name,value FROM xxx WHERE yyy = [*tv_name*]

###Language Overrides Can be implemented by adding files to /manager/includes/lang/override/. Files in this directory will never get altered by future updates.

###Other Important Details for Developers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment