Keyword

[SOLVED] Item view options

  • trogladyte
  • trogladyte's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 5 months ago - 8 years 5 months ago #153128 by trogladyte
Item view options was created by trogladyte
www.ckdev.info/twt

I want to use "Introtext word limit" to keep the page look consistent and make entering items as easy as possible for my client. However this has one gigantic drawback. Enabling this removes the image from the introtext turning the page into a boring clump of plain text - seriously ugly.The whole point of images is to increase readability and convey the message. Apart from using a "readmore" break is there no way of accomplishing this very basic thing? Though tI'd found it by telling K2 not to strip img tags but it went ahead and ignored the setting. Not the first time it seems to ignore what you tell it to do.

I have the following category setup - Drink | Wine | Wine of the week. When a user clicks Drink, I have it set to show the images of the 5 categories under it (which includes Wine) and the newest article posted to the Wine category. If they click Wine, they see the image for Wine of the Week and I have K2 set to show 2 leading and 4 Primary in 2 columns. However, it's showing articles out of Wine of the Week. Now, I agree this could be useful, but I want it only showing articles from Wine.

I want to move the date to beneath the author's name. It doesn't make sense to me to have it above the title. The title should be pre-eminent not subservient to the date.
Last edit: 8 years 5 months ago by trogladyte.

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago #153138 by JoomlaWorks
Replied by JoomlaWorks on topic Item view options
That's why there's the K2 item image option. If you enable the introtext word limit, all HTML tags (including images) are removed to make sure HTML markup for the entire site won't break. Imagine an opening <p> tag in your content that never closes because a word limit came before the closing </p> tag.

As for the category view issue you mention, you can just filter categories to NOT show items from their subcategories. Enable what we call "catalog" mode and you'll get this behaviour.

The last request is easy to achieve by simply swapping the HTML parts in the item.php or category_item.php template overrides. Read more about this here: getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

Doing the above will also allow you to keep your changes when you update K2.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • trogladyte
  • trogladyte's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 5 months ago - 8 years 5 months ago #153143 by trogladyte
Replied by trogladyte on topic Item view options
Yes I totally get the non-closed tag problem. What wasn't obvious is that asking K2 not to strip img wouldn't work. Neither does img,src. It actually needs to be img src to work. The pop up tooltip is misleading as it mentions img only. I would add an image to sho you but your add file is not working.

I have tried filtering (on the menu item), but, if I select the top category (Drinks), "Fetch items from children categories" is set to Yes, and nothing will make it change to "No". So I add "Wine" as well and then it saves as "No" However, when I look at the page, the category images under drink are all gone. The clients other site - not done by me - uses K2 which is why I'm (trying) using it on this new site. They obviously couldn't get this to work either as they worked around it by adding separate menu items for EVERY category. The way I understand K2 this is unnecessary, but seems to be the only way to do it.

DOH sorry, forgot to turn on Catalog mode - now it works. Thanks.
Last edit: 8 years 5 months ago by trogladyte.

Please Log in or Create an account to join the conversation.

  • trogladyte
  • trogladyte's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 5 months ago #153144 by trogladyte
Replied by trogladyte on topic Item view options
Thanks for pointing to the files needing editing to shift the date. That was easy!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum