Book Image

MODx Web Development

By : Antano Solar John
Book Image

MODx Web Development

By: Antano Solar John

Overview of this book

<p>MODx is a content management system and PHP web application framework rolled into one. With the ease of a CMS and the extensibility of a framework, MODx allows you to develop professional-looking, intricate websites with its easy-to-use interface and flexible architecture. MODx provides reusable code called snippets most of which are so generic that, without any modification, they can serve multiple functionalities. The generic nature of the snippets makes it possible to get the perfect customization that is so hard in other content management systems.<br /><br />This book will get web developers up-and-running with MODx. With step-by-step examples and illustrative screenshots, you will be guided through installation, configuration, and customization. By the end of the book, you will have created a powerful, dynamic website by using the individual elements of MODx, without the need for programming know-how.<br /><br />Starting with a walk-through of installing MODx, you will quickly learn how to develop your site without having to use any programming language. Logical, step-by-step instructions will show you how to create your own unique site by adding and editing documents using the inbuilt TinyMCE editor. Change the look and feel of your site by creating your own templates using HTML, CSS, and widgets. By following the example of a blog site, you will learn how to extend your templates to allow rich user interactions through comments, posts, and forms. The book teaches a few core snippets such as Ditto and Wayfinder in detail. These powerful and flexible snippets will enable you to add multiple functionalities to your site. The book will also introduce you to many more snippets which will help you build some of the commonly required web functionalities such as forums and image galleries. Manage your users with authentication and authorization and make your site user-friendly with user groups, forums, and the use of PHx notations to embed logic in templates.<br /><br />Through following this easy-to-use, step-by-step guide, by the end of the book you will have a fully functional, feature-rich MODx site with professional-looking, dynamic web pages that are totally customizable.</p>
Table of Contents (19 chapters)
MODx Web Development
Credits
About the Author
About the Reviewers
Preface
12
SEO, Deployment, and Security
Index

Image gallery


MODx has many sophisticated image gallery snippets that allow you to create an image gallery anywhere in the site. For this example, we will be using the MaxiGallery snippet. To get the image gallery working, install the snippet as explained in the chapter on snippets.

  1. Download the snippet from the MODx repository http://MODxcms.com/MaxiGallery-532.html.

  2. Extract the snippet.

  3. Create a new snippet with the name MaxiGallery, and place the contents of maxigallery.txt as the snippet code.

  4. Copy the assets directory within the extracted folder to the root of the installation. Note that it contains two folders that are to be copied:

    • assets/galleries (Make sure that assets/galleries has write permissions)

    • assets/snippets/maxigallery

  5. To test the snippet, create a document with the following details:

    Field Name

    Field Value

    Title

    Gallery

    Uses template

    Learning MODx default template

    Document content

    [!MaxiGallery!]

  6. Preview the page and you will see something like the following...