Keyword

Sort Criteria for Attachments

  • Mehmet Alp Sirin
  • Mehmet Alp Sirin's Avatar Topic Author
  • Offline
  • New Member
More
9 years 2 months ago #136403 by Mehmet Alp Sirin
Sort Criteria for Attachments was created by Mehmet Alp Sirin
Hi Guys,

may be I am just overworked or too stupid but can anyone tell me the criteria how the attachment in K2 items are sort?
I really tried it hart to find a rule how I can sort them so that in all items with attachments they are shown in the same list order but I really don`t get it. Did the developers coded a random variable?

And further I really would like to know if there is any possibility to show the list of attachments of the item which appears usually at the bottom of the item within the item pagecode.

I wanna describe my case:

I want enable visitors of my hp download wallpapers.

I created 8 wallpapers and in 6 different formats.
This means I have 8 items with each item having 6 attachments.

I have a thumb of the wallpaper in each item. Is there a way to show the attachment list right side or left side of this thumb?

Thanks a lot for your kind help in advance and best regards

Alp

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #136411 by Krikor Boghossian
Replied by Krikor Boghossian on topic Sort Criteria for Attachments
You can override the item template and move the attachments block on top.

This post will help you in getting started with the overrides.
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates

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

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

  • Mehmet Alp Sirin
  • Mehmet Alp Sirin's Avatar Topic Author
  • Offline
  • New Member
More
9 years 2 months ago #136420 by Mehmet Alp Sirin
Replied by Mehmet Alp Sirin on topic Sort Criteria for Attachments
Ok many tnx for this. I will have a detailed look.

But can you give me a hint how I can sort the attachments?

Tnx a lot and best regards

Alp

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 2 months ago #136438 by Krikor Boghossian
Replied by Krikor Boghossian on topic Sort Criteria for Attachments
Open the item.php file for single items, or the category-item.php for listings.
Read the comments and identify the attachments block.
C/p that block up and check with your template developer about the grid they are using. This will help you a lot.

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

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

More
8 years 10 months ago #143798 by leeburstroghm
Replied by leeburstroghm on topic Sort Criteria for Attachments
This will help more

www.slurpitup.com/joomla/tips-and-tricks/sorting-k2-attachments

Its not a great solution, but at least alphabetically is better than nothing.

If only there was an ordering field.. with each attachment.. How can we do this.. Why is it not already part of the attachments function?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 10 months ago #143801 by Krikor Boghossian
Replied by Krikor Boghossian on topic Sort Criteria for Attachments
It's a nice solution, furthermore you can apply it on your templates so you won't need to edit core files.

As for the extra ordering field, unfortunately this is not possible.

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

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


Powered by Kunena Forum