





















































The reader would benefit from the previous article on Installation and Introduction of K2
The power of K2 is in the idea of categorizing your data, thus making it easier to manage. This will be especially helpful as your site grows in content. Many sites are fully article-based and it is not uncommon to see a site with thousands of articles on it.
In this section, we'll tackle some more category-specific recipes.
You may have noticed by now that data does not show up as typical articles do in Joomla!. In other words, if you added an item, set it published and featured, it may not be displayed on your site because you have not set up a menu item to your K2 content.
K2 will need to be added to your menu structure to display the items (articles) in K2.
The first recipe will take into account a site that has been in operation for a while and has K2 added to it.
This section assumes you have installed K2 and have content on your site.
If you have ALREADY imported your content using the Import Joomla! Content button - DO NOT import again. You run the risk of duplicating all your content. Should this happen, you can go in and delete the duplicate items. This can be a time-consuming process.
As you can see under K2 there are several choices to display content on your site. I will choose Item | Item as my display mode. This will show my visitors content in article form.
You can pick what works best for you. Now returning to the instructions:
As you can see, it now starts to take on a bit more traditional Joomla! look. I can choose featured articles, publish them, or note. Set the order they show up in, the category they belong to and more.
When you import content, from Joomla!, the articles retain their identity from Section and Category configuration. For example, the Joomla! Community Portal listed in the preceding screenshot as belonging to the category Latest has a parent category of News.
When you imported the content, sections became the new K2 top-level categories. All existing categories become subcategories of the new top level categories. As we added K2 to a working site with sections and category data already in place, I want to make sure they inherit from our master category.
In our sample site, we see the following screen when we open the K2 categories from the K2 Dashboard:
We instruct the new top-level categories to follow the master category as the model for the rest. The following instructions will show you how.
Extra fields
Did you notice the Associated "Extra Fields Group" is set to - None - ? You can change this parent category group to use an extra fields group and still keep the master category parameters.
Each of the subcategories will inherit from the master category.
By doing this, you can still control all the categories parameters simply by changing the master category.
The category system as described here for K2 is a giant access-control system allowing you the flexibility to structure your site and data as you need. It also offers a means to control the 'look and feel' of the articles from a central place.
When you import a Joomla! site into K2 you bring all the sections, content, articles, and other associated parts into it.
Sections become new parent categories and the old categories become subcategories. This can be a bit confusing at first. One suggestion is to write out on paper what you want the site to look like, and then lay out your categories. You might find that the structure you had can be more user-friendly using K2 and you will want to change.
This category system offers you nearly unlimited means to nest articles. In essence, a category can have unlimited categories under it. There is a limit to this in terms of management, but you get the idea.
Using tags in K2 will give you the ability to improve your Search Engine Optimization or SEO on your site. Additionally, the use of tags will allow you to give your users the ability to follow the tags to other articles. In this section we'll review how to use Tags in K2.
Tags are keywords or terms that are assigned to your content. This enables your visitors to quickly locate what they need by one word descriptions.
Tags can be created before an article is written or on the fly. I prefer on the fly as it will match the article. You can think of a tag almost as a dynamic index. Every time a tag is added to an article, it will show up in the K2 Tag Cloud module if you are using it. The more a single tag, such as Joomla!, is used in the content, the larger it appears in the K2 Cloud module.
K2 Tag Clouds can benefit your search engine optimization and a navigational element.
Here is an example of our K2 Tag Cloud:
This is an image of our K2 Tag Cloud module. The more often a tag is added to an article, the larger it appears.
K2 installs the K2 Tools module by default. The module has many functions, but for our purposes here, we'll use the Tag module.
This particular module, has many functions and you can set up a new module to use any of the great tools built into it.
Next you will want to add some tags to articles. As I said at the beginning of this article, you have two different ways to do this. You may add them to the article or you may add them to the Tag Manager. Let's quickly review the latter method.
This model allows you to tag the content as soon as you create it. If there are tags available, already such as those from the previous step, then you can add them.
Here we have four tags, Security x, PHP x, Joomla x, K2 Content Creation Kit x. Any item (article) that has these tags will be easily found by both users and search bots. Let's see how our Tag Cloud looks now:
You probably notice the changes, especially the addition of the new tag K2 Content Creation Kit. Clicking on that tag will yield two articles, and clicking on the Security tag yields three. Search engines can follow these links to better categorize your site. Users can get a sense of what is more important in terms of content from your site and it helps them navigate.
Closing on this, I strongly suggest you spend time picking tags that are important on your site and is relevant to the purpose of it.