This is part two of a series of posts that explains how to built a blog, using Joomla! and K2.
Create a Wordpress-style blog using Joomla! and K2 (Part II)
Thursday, 26 May 2011 20:51 Published in Tutorials Written by Steven Zeegers{jb_previous}Back to part one{/jb_previous}
Create the ‘Master Category’.
Since K2 is a flexible CCK, you’ll need to configure it to get the desired result. Since we’re going to create a Wordpress style blog, you’ll want to use the same settings for all categories. So, let’s start by creating a ‘Master Category’. Give it a name, for example “Articlesâ€.
- Go to Components > K2 and click “Categoriesâ€. In the overview window, click “Newâ€.
- Title: Name of the Category you want to use.
- Title alias: is auto-generated. Not really necessary to fill in.
- Parent category: Since this is your first category, choose “Noneâ€.
- Inherit parameter options from category: Select “Noneâ€.
- Associated Extra Fields Group: Select “Noneâ€.
- Published: Choose “Yesâ€.
- Access level: Set to “Publicâ€.
Now, it’s time to configure the parameters. You can experiment as you see fit. The instructions I’m giving here will lead to a “Wordpress like†blog.
What does that mean? Like Wordpress, we’ll show five articles on the front page. Each article will have a featured image (or the option to have one). Once you click an article, you see the full article.
On this “full†page, you’ll see an author profile, and you’ll have the option to comment (using Disqus). Pretty simple, right?
Create the ‘Master Category’.
Since K2 is a flexible CCK, you’ll need to configure it to get the desired result. Since we’re going to create a Wordpress style blog, you’ll want to use the same settings for all categories. So, let’s start by creating a ‘Master Category’. Give it a name, for example “Articlesâ€.
- Go to Components > K2 and click “Categoriesâ€. In the overview window, click “Newâ€.
- Title: Name of the Category you want to use.
- Title alias: is auto-generated. Not really necessary to fill in.
- Parent category: Since this is your first category, choose “Noneâ€.
- Inherit parameter options from category: Select “Noneâ€.
- Associated Extra Fields Group: Select “Noneâ€.
- Published: Choose “Yesâ€.
- Access level: Set to “Publicâ€.
Category Item Layout
These options affect how items are displayed in a Category overview.
Under “Lay-out template†you can select a subtemplate, if it’s available. This will depend from template to template. If you’re not sure, don’t touch this!
Now, configure the lay-out grid. We’re going to want to show five identical items, below each other. To do so, use the following settings: (See the screenshot for reference)
- Leading count: 5
- Columns for leading: 1
- Item size for leading items: large
{jb_info}Note: the ideal size of this image depends on the template you’re using. Feel free to experiment. Also, try configuring the image size in K2’s settings.{/jb_info}
Set all the other fields to zero, as we’re not going to be using them. Under “Other layout options†use the following settings:
- Catalog mode: No
- Featured items: show
- Item ordering: Default
- Pagination: Auto
- Pagination results: Show
Category view settings
Since we’re going to go for a “Wordpress styleâ€, we’re going to make the “Category view†very minimalistic. When you open a category in Wordpress, by default you just see a list of the articles – five per page, as on the home page.
To achieve this, set everything to disabled. If you want to show the category name, or even a category name or description, feel free to experiment.
Item Image options
Here, you can set the values for the images. I prefer to configure these settings on a global level, under K2 > Parameters.
Item View options in Category Listings
We’re going for a minimalistic look. We’ll be displaying a part of the post, a featured image, the title, the author name and the category the post belongs to.
- Title: Show
- Link on title: show
- 'Featured' notice (next to title): Disabled
- Author: Show
- Item created date and time: Show
- Rating (voting): Hide
- Image: Show
- Introtext: Show
{jb_info}This will limit the text to 100 words. I choose to do this, so people would be encouraged to open the article itself – so I get a better idea of who’s reading what. In a “true†Wordpress setup, that wouldn’t be possible.{/jb_info}
- Introtext word limit: 100
- Extra Fields: Hide
- Hits: Hide
- Category: Show
- Tags: Show
- Attachments: Disable
- Attachments counter: Disable
- Video: Disable
- Video autoplay: No
- Image gallery: Hide
- Item modified date and time: Hide
- 'Read more...' link: Show
- Anchor link (with comments counter) to item's comment form: Show
Item view options
Now, we’ll configure the article in it’s final form – which is what the reader gets to see when he clicked the ‘Read More’ button or reached the page otherwise.
If you want a Wordpress-like experience, this part is pretty simple. Just set everything to “enabledâ€. If you think there’s too much clutter on your screen, you can experiment with disabling some of the fatures.
{jb_info}Pay attention to the dropdown for Image Size, as it’ll affect how big your “featured image†is displayed. The value of each size is set under Components > K2 > Parameters.{/jb_info}
Other categories
Once you have created the master category, you’ll never have to configure another category again. When you create a new category, simply do the following to reuse these settings:
- Start by filling in the “Details:
- Title: Name of the Category you want to use.
- Title alias: is auto-generated. Not really necessary to fill in.
- Parent category: You can order your categories as you see fit. If you want a category to act as the child category of another, choose the parent category.
- Inherit parameter options from category: To “clone†the settings of the Master Category, select the master category.
- Associated Extra Fields Group: Select “Noneâ€.
- Published: Choose “Yesâ€.
- Access level: Set to “Publicâ€.
And that’s it! Your new category is now up and running.
{jb_next}Continue reading{/jb_next}
Steven Zeegers
Typical nerd who earns his money in the IT sector, who can't turn of the computer after works. Loves Joomla!, Gaming, Blogging, and is only slightly addicted to Twitter.
