virya technologies - ruth cheesley - getting started with k2 and joomla!
DESCRIPTION
A presentation given at Joomla! User Group Suffolk on 13th October 2011 on getting started with K2 in Joomla! - covering how to configure K2 and what all the settings mean, how to create K2 templates, and more.TRANSCRIPT
Ruth Cheesley
Copyright © 2011 Virya Technologies
Getting started with K2
Hello, I’m Ruth Cheesleyfrom Virya Technologies
Find my social media stuff here! @RCheesley
What is K2
• Content Construction Kit (CCK)
• Extends what Joomla! articles can do
• Allows cool features
• Tags
• Per-category styling
• Close control of layout
• Template overrides
What version to use
Stable release
Lots of extensions
Lots of plugins
Lots of template overrides
OK Support
SVN release
Not many modules
Even fewer plugins!
Overrides need tweaks
Not much support!
Joomla! 1.5 Joomla! 1.6/7
Key concepts
• As many or few categories as you need (including unlimited nesting)
• You can use tags to link related items
• Images added via K2 are automagically resized to the required dimensions
• You can use extensions to create per-category styling
Getting your head around the settings
How to show stuff!
• Category Item Layout
• Category View Options
• Item Image Options
• Item View Options in Category Listings
• Item View Options
Should be other way round (in my opinion)
Configuring K2
• Some of the settings are not logically ordered
• Once you understand what each group of settings control, it’s easy!
• Some settings must be set in global parameters, others in category
• Same idea as Joomla! articles in terms of inheritance of settings
Take a deep breath!
Global Parameters
Easier to show you in K2 itself
We’ll look at 1.5.x and 1.7.x (SVN) on a localhost installation
Title (Category)
Show subcategory blocks displays this area, columns
determines number of columns for the icons, ordering
determines how to show the subcategories
This is controlled by the language file
Category View Options
Item counter (Category)
Description (Category)
Image (Category)
RSS Feed icon/link
Sub-Category
Title
Sub-Category
Item Counter
Sub-Category Description
Sub-Category
Image
1 COLUMN 2 ARTICLESLeading StoryLeading Story
2 COLUMNS 4 ARTICLESPrimary StoryPrimary Story
1 COLUMN 4 ARTICLESSecondary StorySecondary StorySecondary StorySecondary Story
2 COLUMNS 4 ARTICLESPrimary StoryPrimary Story
2 COLUMNS 8 LINKSLinksLinksLinksLinks
2 COLUMNS 8 ARTICLESLinksLinksLinksLinks
Category Item Layout
Image options
Generally set these in global parameters UNLESS you have a category which needs to
have different sizes to the rest of your site
(e.g. a portfolio where you want different size thumbnails)
Set in pixels, this controls the image WIDTH only (proportional resizing)
Item view options in category listings
Item view options
Creating K2 templates
• Copy the default template folder from the K2 directory
• Copy the default template and rename it to something relevant
• Upload it to your template override folder
Explaining the template files
Category blog layout
Individual items in category blog layout
Links in category blog layout
Individual article layout
Comments form
Create an article form (front end submission)
Latest items category blog layout
Individual items in latest items category layout
Items by tag layout
Items by user layout
What can you do with templates?
• Move stuff around
• Change CSS classes (e.g. to left align images in category view and flow text around them)
• Tweak how dates are displayed
• Add images (e.g. for comment, media & video anchor links)
IMPORTANT NOTE
• Template overrides are NOT UPDATED when you update the extension
• Hurrah, this is great! – avoids core hacks
• Boo! This is not great! – if there are patches for files which are overridden, or variables change.
You MUST update your overrides (it doesn’t happen often, devs usually clearly warn about this, but important to remember).
Some cool plugins and modules
• Css4k2 (http://www.jiliko.net)
• K2 Dynamap (http://nick.texidor.com)
• K2 Multi Notifier (http://k2joom.com)
• Land of Coder (http://www.landofcoder.com)
• DM Digital (http://joomlaextensions.dmdigital.it)
Example sites
www.able2uk.com
www.rsnonline.org.uk
www.suffolkdofe.co.uk
www.viryatechnologies.com
www.prhengland.co.uk
Thank you!
Find my social media stuff here! @RCheesley
Ruth Cheesley