K2 Item page breaks in Joomla 2.5? - joomla

Is it possible to make page breaks functional in K2 items? I'm running K2 2.5.5 on Joomla 2.5 with JCE.

no you must use a joomla plugin to do this.
Try this : k2 pagebreak in the JED.
The one i use on my k2 site : PageBreakMyJspace.
With this one, you can also add a table of content directly inside your K2 items.

Related

How to disable items limit on category page in Joomla K2?

The website I'm working on uses component K2 for Joomla 2.5. Just 10 items [articles] are displayed on category page inside of #itemListLeading div and 10 inside of #itemListPrimary. How can I disable this limit and display all the items?
You may echo all the items on the category page with direct query to MySQL without the limit of #itemListLeading. See How to get Joomla K2 item as object on category page?

Confused between Joomla Alternative Layout and Templating with K2

I am really confused about these 2 concepts. I am basically wanting to change the appearance of the Joomla category page that lists the sub-categories in it. I dont like the default "Alternative Layout" options of Blog and List type. I want to show the sub-categories with an image + sub-category title style similar to some Portfolio layouts I've seen. So I started googling and reading a few docs on how to do this. During this time, I came across the Layout Overrides in Joomla which says that we can create alternative Joomla Layouts to display Modules, components, Category and Menu Items.
Q1) So does this mean that I can create a new layout (for portfolio category as an example) and if I place them inside "templates/myTemplate/html/com_contact/category" folder this layout option will be listed under Alternative Layout drop-down list in admin panel?
While I was reading some more, I then came across the K2 method where it says that K2 allows creating sub-templates to have different styles for each categories. I havent decided if I am going to use K2 or the core Joomla articles. But my main concern is to style some category pages differently to the default blog or list options. When I read the above article, I thought this can be done in Joomla core itself. But when I read the K2 article on Templating with K2 (and the concepts of sub-templates), it said that the core Joomla doesnt allow sub-templating and K2 can do that.
Q2) What is the difference between creating sub-templates for K2 categories and creating custom template layouts for Joomla categories?
I am totally confused here. If Joomla allows to create different layouts for categories which can then be chosen from the admin panel on what layout to use for that category, what is so special about K2's sub-templating which claims that only K2 allows the flexibility of choosing a different layout for different categories?
Can someone help me understand this please? I have been searching to understand the difference for several hours and I am still stuck on this...
I am new to Joomla and I am using the Joomla version 3.3.
There is a big difference in Joomla core Alternative-Layouts and K2's approach. Hard to explain in theory...
Joomla:
The core feature offers two choices: Either create Alt-Layouts and assign them to each Category and (each!) Article in Backend. Or with a new, alternative MenuItem. The latter is achieved through an additional XML file with same name and location. As long as you work with Categories and Listings, the result is quite similar. But it is different when it comes to the Article Fullview: You won't get an alternative layout for full view automatically! You have to assign the layout in backend or use 1 global setting from the article options. The latter will only apply to articles that have no respective Alt-MenuItem. This can result in a "chicken-egg-situation". AFAIK, frontend submission requires an alternative MenuItem for each edit-form. You can't get an alternative full-view layout when you click on a blog/list item "easily". The links from your category items still lead to the "default" without extra work. In my experience, full-view layouts are displayed in the following setups only:
Alt.MenuItem (XML) for Category and Article. A MenuItem for each article has to exist, to automatically pickup your alt.Layout.
Alt.Layout assigned to each Article. (manual work)
Alt.Layout set for Category (no XML). Only 1 global setting in Article's manager options.
K2:
The layout folder structure is simpler. All layout files live in the same folder, you just rename that container folder. e.g. products. The inner files keep their default names. This results in an easier and automated "workflow". A layout is assigned to a category and/or its sub-categories. Article full-views pick up their layout automatically, due to the file/folder structure. There is no difference between frontend/backend. No manual assignment on article edit is needed. Nor single K2 items in the menu. (not to mention, that you get extra fields per category)
Hope this helps.

Joomla2.5 Cannot translate K2 extra fields values with joomfish

I am working on a multilingual joomla 2.5 website and I am using K2 articles.
In K2 I have an extra field which is a drop down list.
When I am using joomfish in order to translate it I can only translate the field's label.
Is there a way to translate the list's values?
Thank you
Give this a try -
https://code.google.com/p/getk2/issues/detail?id=491
This is a core hack so you will have to redo it every time you upgrade K2 until they get it added to the extension.
I use FaLang to translate k2 items and extra fields names. To translate extra fields values I use the Easy Language plugin and it works perfectly.

Joomla K2 change "read more" link

I'm using the K2 Component in Joomla to manage my articles and categories.
Now, I want to link the 'read more'-button to another article, but I don't find the option to change this link (default linked to the article itself). How could I change that?
There isn't an option in K2 to change this. Will the Read More buttons always link to the same article, or does this need to be configurable?
If it is always the same, you could likely create a K2 sub-template to do this.
Otherwise, you would likely need to create a custom plugin.

Joomla K2 link to category or item in module?

I am writing a Joomla module that accesses the K2 tables such as K2 Items and K2 Category. I have managed to pull out the K2 Items I wish from the MySQL database for display, but I want to be able to create a clickable link to the K2 Item or its K2 Category. I am not able to find this information. I have looked at the K2 Item template, but if I attempt to use the same code for the link it doesn't include the full path. It leaves out http:// and the domain.
Is creating a link to a K2 Item or K2 Category in Joomla different than how the link must be created for a Joomla Article or Joomla Category? Either way, how do I create one for K2 Items and K2 Categories in my Joomla module.
Here is a PHP code example I am using from the Joomla K2:
$db = & JFactory::getDBO();
$category = & JTable::getInstance('K2Category', 'Table');
$category->load($catid);
$item->category=$category;
$item->category->link = urldecode(JRoute::_(K2HelperRoute::getCategoryRoute($category->id.':'.urlencode($category->alias))));
echo $item->category->link;
This prints out the path, but it doesn't include the domain.
/joomla/index.php/component/k2/itemlist/category/4-something-here
What I'm expecting it to print out in this example to make it a valid link to the category:
http://example.com/joomla/index.php/component/k2/itemlist/category/4-something-here
If you want to get the base URL for the site, you can use JURI::base() to get it. I'm not entirely sure what you want to do, but it may be a better idea for you to grab the application with JFactory::getApplication(); and then use setRedirect.

Resources