If you do a lot of custom installations of mojoPortal, or create skins/themes that are designed to contain content in a very specific layout, you may find yourself spending a great deal of time doing manual setups for each site after your initial install. There’s a way to avoid spending so much time on the manual setup; this also makes deployment to different environments an absolute snap.
We’ll start with Joe Audette’s article “Configuring Initial Content in mojoPortal“; in this article, Joe explains how to create .config files, which are essentially XML files.
These .config files allow you to
- construct your initial page structure
- designate “friendly url” for each page
- set page-level security
- indicate the features you want to be included on each page
- in which panels the features are to be inserted
- the order in which features are to be displayed
- designate the initial security levels for each feature
- indicate external config files for content to be inserted in each feature
Wow – that’s pretty powerful stuff! It’s a great way to configure different pre-sets for specific projects; especially if you’re a service provider, and find yourself doing setups for internal groups or new clients on a regular basis.
However, there are some caveats; because this system was evolved over time, some features aren’t able to utilize pre-sets such as custom CSS classes. Because it was one of the first features added to mojoPortal, the HTML Content module is one of those features. I had to do a bit of custom work to figure out a workaround for this, as well as page-level settings that aren’t configurable via these .config files.
My solution: use naming conventions for my initial content and page features, and create a .sql file to be run against the mojoPortal database after the initial install. This also allowed me to set custom CSS classes for HTML content, set the site’s company name and slogan (this was for a client-specific design), set the “Privacy” page to not be displayed on the menu, and the primary page skin to be separate from the site’s main skin. This made initial setup and content deployment an absolute breeze!
It’s also a great way to create layout presets for various basic designs, so that you can standardize your product offerings by layout, over and above themes themselves. Hope you find this as much of a time-saver as I do!