Keyword

k2 Tools tag cloud - tag ordering

  • Kogos Grain
  • Kogos Grain's Avatar Topic Author
  • Offline
  • New Member
More
8 years 8 months ago - 8 years 8 months ago #150716 by Kogos Grain
k2 Tools tag cloud - tag ordering was created by Kogos Grain
I use tag cloud of k2 tools module to display tags in my homepage... I'll be having about 100 tags in the near future, so i set a limit of 20 tags in module's properties. The module is showing the tags in alphabetical order... but i want it to show tags in reverse alphabetical order.

For example, i got tags with names like : "issue 1", "issue 2", .... , "issue 99", "issue 100".
No mater tag id, date the tag was added or number of articles/items per tag, I want the module to display tags in reverse alpha order : "issue 100", "issue 99", "issue 98"...

Can this be done with k2 tools modules? I tried to play around with a mod_k2_tools/tags.php override file with no luck, i have no idea what to change in this file to make it possible.

Any help would be greatly appreciated. Thanks for your time

Edit: ok... i feel like an idiot here... i must be getting very tired and missed the obvious solution. I used "array_reverse":
i replaced
<?php foreach ($tags as $tag): ?>

with
<?php foreach (array_reverse($tags) as $tag): ?>

Mods, feel free to erase that post/thread since the answer is pretty obvious and easy... or just let it be for future reference...

Of course, any comment for an alternative solution is always welcome.
Last edit: 8 years 8 months ago by Kogos Grain. Reason: found a solution myself

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 8 months ago #150740 by Krikor Boghossian
Replied by Krikor Boghossian on topic k2 Tools tag cloud - tag ordering
Thank you for your feedback Kogos.
This will benefit a lot of users.

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