Custom data types make all the difference between a cool blogging tool and a true CMS. To date, there isn’t a complete solution for managing custom data for multilingual sites. Types and Views will change all this!
In the last 5 months, we’ve been working on two major new plugins for managing and displaying custom data in WordPress. We’re less than a month away from release and it’s time to make an informal introduction.
Types – Defines Custom Data
First, we need to tell WordPress what our custom data is. Types allows us to setup custom post types, taxonomy and custom fields.
Types lets you define and edit custom post types and taxonomy, and the relationship between them.
When you edit custom types, you get the full details, including the name, description, menu properties and all the little texts that you can choose.
The real fun begins when you start setting up custom fields for your newly created types.
Types contains complete custom-field management for WordPress. You can setup meta-boxes, choose which fields to list in them and on which content types these boxes should display. In case you’re wondering, we borrowed some great ideas from the popular Drupal CCK module for our Types.
Types includes all the ‘regular’ field types (like text fields, textarea, radio and checkboxes), as well as special fields, like image, URL, phone number, etc.
Fields include built-in data validation. When you insert a field, Types can check that user-data is valid before it can be saved.
Also, you can specify what to do with translations, for each field. You can choose if WPML will translate that field, copy it, or do nothing.
Once it’s all setup, users see your new, shiny, custom edit screen. This is how the new ‘Program Attributes’ box, which we defined above, looks like:
Views – Displays Custom Data
So far, so good. We can tell WordPress which custom types we want, what meta-boxes to create and which fields they will contain.
Users can now enter custom data to the site. But, how do we display it?
This is where Views comes to play. Views is a comprehensive package and displaying data in your site. It includes two main module:
- Dynamic Templates – creates child templates without editing PHP files
- Data Lists – queries and displays data
The templates engine is responsible for the display of single pages. It lets you create a page template using HTML and shortcode (using a GUI). You’ll be able to create complex page templates for standard and custom data types without learning WordPress API and without using PHP. All the standard and custom fields appear in the GUI and you can customize with different properties.
The lists engine is even more powerful. We call them Views. A View includes a query generator, which lets you load lists of data. It also includes a render engine for iterating through this data and displaying it. You can insert a View into any WordPress content, or use as a widget.
Views is a big plugin and deserves a post of its own. I’ll write about it, with full details, very soon.
Fully WPML Compatible
Of course, Types and Views are designed for WPML compatibility.
When you create new data types, it’s fully multilingual. The edit pages will show in the correct language. Every piece of text that you enter to define a custom type will appear in WPML’s String Translation screen.
When you insert a View into your content or use a Dynamic Template, you’ll discover that it’s multilingual as well. You can translate strings using WPML’s String Translation and meta-HTML using the Translation Editor.
When, Where and How Much?
Right now, we’re at the testing phase for both Types and Views. We’re building reference designs that use Types, Views and WPML and are going through issues that come up. We should have a complete clean release in about a month.
Types will be a free plugin, available to download through the WordPress plugins repository. Views will be a paid plugin. The planned cost will be $50. We’ll have final details as we release both plugins.
As soon as we have beta versions, I’ll write more about it. We’ll be giving away free Views accounts for the first folks to test and use it.