Directory template, Alpha group categories

9 years 2 days ago #2855 by Linuus
Weird title, huh? ;)

I made a dirty directory template that groups the subcategories by their first letter. A, B, C and so on...

It displays all letters even if there is no category starting with that letter. I don't care about this as I will have that :)
It also sorts the categories alphabetically.

The "Alpha Index" showing in the attached image is not a real alpha index. It just scrolls down to the chosen letter when clicked. I guess it can be easily rewritten to support some kind of real alpha indexing.
(Feel free to to that! If you post it here when you're done ;) )

I'm not that good with programming for Joomla, but I guess it'll work.

Use the MVC override, don't override the original template.

Put the php file in:

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

9 years 2 days ago #2867 by pepperstreet
Nice one. I like it.
Thanks for sharing your solution!

Since directories are not in the actual templates logic...
is it possible to have a selection for different layouts in the menu parameters? I am thinking of a "selectable Override" ;-) If i put differently named variations of "default_categories.php" in the override folder, i wish i had a select-box in the menu, where i can choose one of them...

Doesn't it make sense... Is this possible at all?

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

8 years 11 months ago #3011 by Linuus
I'd like to create some kind of pagination on this. I will have a lot of categories and to display them on one page is not that good... Will probably put unnecessary load on my server.

Any ideas?

I guess I could just change the "Alpha index" to send a variable like:

And then only display all my "A" artists.

Or is there a better way? :?:

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.