Keyword

How to create an alphabetically index of items?

  • Suba
  • Suba's Avatar Topic Author
  • Visitor
11 years 5 months ago #112343 by Suba
I want to have an index like A - B - C - D, etc, and then when user click B, then all items in selected categories that have titles like B% will show up. How can I do this?

I know I could probably create a category and a menu item for each letter, and ask the content editors to always make sure he selects the right category, but that is a bit too cumbersome and undymanic.

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

  • Suba
  • Suba's Avatar Topic Author
  • Visitor
11 years 5 months ago #112344 by Suba
Is this not possible with K2?

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

More
11 years 5 months ago - 11 years 5 months ago #112345 by Eric
i'm sure it's possible, but not sure if it can be done without code changes or a plugin, i know how to make an alphabetical list of articles though if that'll help

i would think the code could be modfied in such a way to do what you asking

for the alphabetical article list, create a new k2 content module and set it up like the first attachment, then it should looks like the second, change things like "Category filter" as needed

i like to modify things, and make them do unintended things
Attachments:

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

  • Suba
  • Suba's Avatar Topic Author
  • Visitor
11 years 5 months ago #112346 by Suba
I tried your alternative solution. The biggest problem with this is that there is no indexing or pagination. I can only set Item count, and that is the constant number of items that will show up. Sure I could set it to 99999999999999 so I am sure it there's place for new items for a long time, but then all items will be listed on one page.

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

More
11 years 5 months ago - 11 years 5 months ago #112347 by Eric
i forgot to ask but do you want this as a page or module? for a page with pagination try this:

make a new menu item, with the "k2 category" menu item type, and within "Layout options for multiple category selection" (either none, or more then one need to be selected) set all counts to 0, except for links, the number entered is how many are shown per page

(the removal of "more..." looks to be a easy css change if wanted)

if for module, I'm still experimenting, but one idea is to use that page within a wrapper but then that might make a whole new set of issues

i like to modify things, and make them do unintended things
Attachments:

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

  • Suba
  • Suba's Avatar Topic Author
  • Visitor
11 years 5 months ago #112348 by Suba
I'd prefer having it as a page. I have created a K2 Category menu item (and called it Reviews). Under Basic Options, I can select categories and Item ordering. All other options under Basic Options are disabled (read-only)!

The menu structure looks like this:
Top Menu
-Reviews (Parent Item=Menu Item Root)
--Record reviews
--Video reviews

Selected categories for Reviews = All reviews.

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

More
11 years 5 months ago - 11 years 5 months ago #112349 by Eric
more then one category needs to be selected otherwise the rest of the options are greyed

create a new category within k2, but leave it unpublished (published set to no on the category edit screen), and then back at the K2 Category menu item select the category you want and the new one (ctrl+click to select more then one) then the rest of the options should work

i like to modify things, and make them do unintended things

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

  • Suba
  • Suba's Avatar Topic Author
  • Visitor
11 years 5 months ago #112350 by Suba
Thank you!

Is there a way to remove the border around the box and the "More" text at the top without hacking the core? If I hack the core template and css file, I'll need to remember to re-hack it everytime I update K2...

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

More
11 years 5 months ago - 11 years 5 months ago #112351 by Eric
for the "more..." it's hardcoded into the css, it's a super-fast fix though, and i'm guessing there's probably a way to override so it's still there after an upgrade but i haven't figured that out yet

go to:

/language/en-GB/en-GB.com_k2.ini

in about the middle of the file find the line:

K2_MORE="More..."

and either remove the more so it looks like:

K2_MORE=""

or change the part between the quotes to anything you want

for "the border around the box", i'm not sure what you mean, it might be a theme based thing, i'd have to see it to know

i like to modify things, and make them do unintended things

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

  • Suba
  • Suba's Avatar Topic Author
  • Visitor
11 years 5 months ago #112352 by Suba
Thank you! I also found out how to remove the background and border of the links box by editing k2.css div#itemListLinks. I just have to remember to repeat these step after next update.

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


Powered by Kunena Forum