FlexiContent Tutorial: Basics

I have recently, and rather silently, updated my website this month. The central feature of this website is now FlexiContent, which is a great extension for Joomla built by Emmanuel Danan, and has recently joined together with a few others to bring it to full life. I spoke with him a while back about the extension, and it was born out of a need to do more with Joomla. He has graciously developed it and made it into a free extension for us, and while its still in beta at the time of writing, its very stable.

This tutorial will go into the basics of using FlexiContent, and won't go into all of the neat little (and some not so little) things about it. Thats another tutorial (or tutorials) for another time.

FlexiContent solves what problem?

You may be wondering exactly what the problem with Joomla's core content management? The answer: nothing. It works just like it was designed, and works well in many situations. Joomla is so versitile that most limitations in content management have been filled by other extensions, for example download managers. So there isn't a problem with Joomla, but a limitation. FlexiContent comes in to provide extra functionality and flexibility, by allowing you to create your own content types. If you aren't familiar with the concept, don't worry I'll cover it in a moment. FlexiContent can essentially reduce the dependance on multiple extensions to manage your website, and in the end this can help with keeping your content uniform and allows you to easily manage it.

What are content types?

You know what content is in Joomla: articles. We tend to think of content as simply the text on the pages, which is governed in Joomla by creating articles. Now you've probably installed another component before, and that extension likely created another content type. An example would be if you installed a download manager, you would be managing a list of downloadable files and their associated information. This is a content type, and its different from the default Joomla article. There are many extensions that modify or extend the default article content type (attachments allows you to add files to articles), but in essense these are actually creating new content types.

So essentially content types are units of information. That is why articles are named as they are, because in Joomla they work most like articles in a news paper. Joomla works great for websites that have regularly published information. It does not, by default, make it as easy to allow a user to download something, much like a news paper doesn't usually come bundled with CDs or other kinds of information.

On this website I also provide some downloads, I have a blog, and I have several static pages. Therefore I actually have 3 content types. They are all slightly different, they share most of the same features (a title for example), but each have something unique (downloads have a file field unlike the others).

How to start using FlexiContent

Now that you understand the rationale for using it, the first thing you have to do is decide if the features of FlexiContent will benefit your purpose. The easiest way to answer this is: can I make this website without installing extra extensions? If yes, then just use Joomla. If you would need additional extensions, then ask yourself: do the features I need add new content types? If yes, then FlexiContent is probably going to be able to handle your needs. I do recommend not to import your Joomla content for the first time you use it.

Install it, and go to the extension. First thing is to make sure you do anything the extension asks. Usually you need to install a few sample data pieces to make everything work (the default content types for example), and select a default Section. Now you are ready to get started making your own content type! We are going to make a download type, similar to the type on this website.

Go to Types, and you should see 'Article' as the only option. Flexicontent uses Joomla's articles as a base for extending the functionality, which basically means it sits on top of the default Joomla articles and gives them more life. Click 'New' and lets start making your own. You'll be asked to give it a name, say 'Download', and hit 'Save'. Look at you! You've made your first content type, but now lets see what it has.

Adding fields to your content types

Now go to Types again, and you'll see the two types. To the right of Download you will see the Fields column, and click on the [view fields] link. This is the list of the default information fields associated with any content types. You should recognize them, they are the same as the default Joomla Article fields. For this type, I want to keep them all. I just want to add a few new fields, so in the toolbar click 'New' and lets add a File field. Give it a label of 'File', a name of 'file', and then go down to Field Type. Here you can select various kinds of fields, like checkboxes, text, or in our case, files. Select File, and you will notice on the right side one of the panels changed to reflect your choice. Now on the right side, select which Types the field will be applied to. In our case, we only want Download so click on it only. This means the Article type won't use this field. You can take some time to review the descriptions of the rest of the settings, but hit 'Save'. You could repeat this for other things, such as an image and other fields.

Categories and content

Now we are ready to do more familiar tasks, creating a category and then a piece of content. Go to categories, and create a new category called 'Downloads'. In our case, we'll want to use it to display a list of files available for download later, so we'll keep them all stored in one category.

Now go to Items. Click 'New' and you'll see a screen that you have to fill out some information. Item is the generic word for all of the content in your website, so you have to first tell FlexiContent what type of content you will be creating before it can load the correct fields. So give it a title, lets say 'My awesome download', in the Item Type dropdown, select 'Download', and then in the right column for Primary Category, select 'Downloads'. Hit 'Apply', and the page will reload with more fields for you to fill out.

Now you will see a layout which is very similar to adding an Article in Joomla's content manager. However, if you go below the big input area on the left, you will see a little field with the label 'File'. This is our extra field we've added. So give the download some information, and add a file (try a zip or image file, you can configure in the settings what files are allowed). Hit 'Save' and you've created your first custom content item. Now, the last thing we need to do is make it accessible in Joomla, and like anything else, we have to first create a menu item.

Creating the menu links to your new content

This works just like you would expect if you are familar with Joomla. Go to the main menu, and lets add a new menu item. Select FlexiContent->Category, and you'll see the add screen. Give it a title like 'Downloads' and in the right you can select the category you want to display, in our case 'Downloads'. Hit 'Save' and view the front side to see your new creation. Once you have the basic content types setup, the rest is just adding the new items.

How do I change the way its displayed?

By default, you will see a list of items in that category, and probably an alphabetical filter. There are two places to go for that. First, go back to FlexiContent, and Categories. Go back to our 'Downloads' category, and on the right side you will find lots of options on how to display the category. The other feature is called Templates, which is a more complicated functionality that I'll let you mess with. You are able to create different kinds of templates and assign them to categories, types, or even individual items.

You are now well on your way to understanding the extra flexibility that FlexiContent can provide to you. Its a great extension, and much thanks to the FlexiContent team for the work they have done.

Don't forget, Joomla still has the power

I don't want to give the impression that Joomla should be doing more than it is by default, because it does an amazing amount of work without adding extensions. There are many who would say Joomla should adopt a more extensive set of core features, including content type creation. It is my opinion that it is best to keep the core small (easier to maintain, easier to use) and to avoid loading Joomla up with extra stuff that many websites won't use. In fact, it would be best if Joomla only shipped with the essential features. So don't think that Joomla is too weak and needs one of the many content extensions out there: that is simply false. Drupal doesn't come with CCK in the core, and while its the first added in many cases, its not part of the essential functionality of Drupal. I think the same applies here. FlexiContent provides extra tools that aren't needed by every website, and by the way, it runs on Joomla.


J and Beyond 2012 | An International Joomla! Conference - May 18th - 20th, 2012, Bad Nauheim, Germany

About Gnome on the run

We are a full web development studio located in the Houston, Texas area. We blog about websites, video, design, business, web analytics, conversion tracking, and various open source projects we work with.

You can track us on the following networks and ways.

Follow Gnome on the run on Twitter Like Gnome on the run on Facebook Connect to Gnomeontherun on LinkedIn View videos from Gnome on the run on Vimeo Get the Gnome on the run RSS Feed

 

Blog Categories

 

Interested in us?

If you have a project you'd like to ask us about, feel free to request a free consultation from us.

Request a consultation »