Introducing MODX Revolution and the concept of Creative Freedom at the first PHP Zwolle Meetup on August 27th.
Relevant links:
MODX.com => official website
rtfm.modx.com => official documentation
github.com/modxcms/revolution => source code
MODX.today => daily links/articles about MODX
modmore.com => premium extras for MODX
https://joind.in/talk/view/15031 => for feedback on the talk
2. Who am I?
Mark Hamstra
Founder & CEA at modmore
Freelance MODX Developer
my doggies
Turbo
Bommel
3. Agenda
• What is MODX, for whom, available
features, how to build a MODX site
• Tour of the MODX Manager (back-end)
• The Architecture of MODX, xPDO ORM,
extending and overriding, the future
4. MOD-what?
• Open Source
• Written in PHP (of course)
• Primarily used with MySQL, other drivers available
• Already 10 years old young
• Content Management System Framework Platform
6. All the features of a CMS
rich text editor versioning user groups
multisite templates multilingual extensions
markdown media browser hierarchical
page tree commercial support automatic
menu builder blogging permissions seo
friendly urls server-side caching
17. No need to reinvent
the wheel
• Packages (aka extras, add-
ons, extensions, third party
components…) provide
common functionality
• Install via Package Installer
inside the manager
18. Example: getResources
• Lists resources matching
conditions
• Uses a Chunk as template
• Use Cases:
• Article listings
• Dynamic (sub)menus
• RSS feed generation
Template
Chunk “blogListItem”
19. Time for a Manager Tour!
http://localhost/tmp/phpfrl/manager/
26. Custom Models with xPDO
1. Create an xPDO Package Schema (XML)
2. Use build script to write schema into the actual
model files/classes
3. Register it before use ($modx->addPackage)
4. Use any xPDO method (getObject,
getCollection) on your custom model
33. Interacting with that model
$modx->addPackage(‘phpfrl’, ‘/path/to/model/‘);
$c = $modx->newQuery(‘frlMeetup’);
$c->sortby(‘starts_on’, ‘DESC’);
$meetup = $modx->getObject(‘frlMeetup’, $c);
echo ‘De volgende meetup is ‘ . $meetup->name . ‘ en vind plaats op ‘ . $meetup-
>starts_on . ‘. ’;
$speakers = $meetup->getMany(‘Speakers’); // or just $meetup->Speakers
foreach ($speakers as $spegfytaker) {
echo $speaker->name . ‘ zal vertellen over ‘ . $speaker->subject;
}
34. The Future of MODX
• MODX 3 & MODX Next
• Backwards incompatible release (semver)
• Cleaning up legacy code no longer relevant
• Full namespace support for xPDO models
• Composer/packagist support
• Proper Dependency Injection in the core
• Improved, faster routing with Slim
35. Interesting links:
• MODX.com => official website
• rtfm.modx.com => official documentation
• github.com/modxcms/revolution => source code
• MODX.today => daily links/articles about MODX
• modmore.com => premium extras for MODX
• https://joind.in/talk/view/15031 => please leave feedback
Enjoy your Creative Freedom