developing in modx
DESCRIPTION
Brief description on how to develop using MODx RevoTRANSCRIPT
![Page 1: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/1.jpg)
Power Developing Extras
For MODx Revolution
![Page 2: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/2.jpg)
Coming to Terms with Terminology
• “Extra” - Anything coded for MODx. Also called ‘Component’, ‘3PC’, or 3rd Party Component
• “Add-On” - Anything that doesn’t extend core but ‘adds’ functionality
• “Core Extension” - Anything that extends the core
![Page 3: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/3.jpg)
Coming to Terms with Terminology
• ‘CMP’ - Custom Manager Page
• ‘Lexicon’ - A collection of translation entries, or strings
• ‘Namespace’ - A unique name identifying your Component
![Page 4: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/4.jpg)
The Power of Extras• Develop custom web applications
• Courseware, amazon gallery systems, web service integrations, ecommerce tools
• Create Transport Packages to deploy anywhere and to anyone
• Internationalization support readily available
• Use the power of xPDO to access custom tables
• Custom Manager Pages to have your own rich, ExtJS (or other library) powered manager UIs
![Page 5: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/5.jpg)
Two Methods of Dev
• Method One: Develop for myself
• Easy - same way as Evolution
• Can use new API, no need to add build script
• Cannot be distributed with Package Management
![Page 6: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/6.jpg)
Two Methods of Dev
• Method Two: Building a Transport Package
• Makes for easy point-click installs
• Can be distributed via Package Management
• Allows others to use it easily
![Page 7: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/7.jpg)
The Namespace
• A unique identifier of your Component
• Related to Settings, Lexicons, CMPs
• Namespace path tells MODx where CMP is
• Think of it like the house your Component is built in
![Page 8: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/8.jpg)
Lexicons for Internationalization
• Lexicons allow your components to translate
• $modx->lexicon(‘entry_name’);
• Separated into topics. Loaded by: $modx->lexicon->load(‘namespace:topic’);
• Tied to Namespaces
![Page 9: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/9.jpg)
Custom Settings
• Settings can be dynamically added
• You can package in settings
• System -> Context -> User
![Page 10: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/10.jpg)
Custom Manager Pages
• Also called ‘CMPs’
• Replaces Modules
• Access to MODx API
• Can either embed your script in a MODx page or load it completely alone
![Page 11: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/11.jpg)
CMPs: Actions and Menus
• An Action is a controller - a database representation of a php file
• A Menu is a menu item for the top nav
• Menus attach to an action
• Menus can use lexicon entries
![Page 12: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/12.jpg)
Properties and Property Sets
• Any tag can now have properties
• Tags can be nested with properties
• Common Properties can be grouped into Property Sets
• Default properties can be set for any Element
![Page 13: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/13.jpg)
Case Studies: The Wine Guide
• by Digital Butter Limited
• Custom Manager Pages
• Custom DB tables
• Language-specific Contexts
• CSV imports/exports
![Page 14: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/14.jpg)
Case Studies:The License Coach
• by Collabpad
• Dynamic Courseware System
• Enrollments, Courses, Chapters, Modules, Quizzes, Dynamic Questions
• Enrollments/Courses can be restricted to Branches
• Signup via website, tracking, heavy reporting, time tracking, etc
• Course Plans to assess risk/progress of students throughout course
• Heavy CMP usage - trees, grids, TinyMCE integration
![Page 15: Developing in MODx](https://reader037.vdocuments.site/reader037/viewer/2022100518/559a5ee11a28abc41d8b46e8/html5/thumbnails/15.jpg)
Example Component: Doodles
• Objectives: Display a list of Doodles that are loaded from an external DB table
• Have a backend mgr UI in ExtJS to edit them with
• Make it translated via Lexicons
• Have a Transport Package (TP) to distribute with