Keyword

K2 Auto Categories and Auto Articles

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 7 months ago #78396 by Omar Ramos
K2 Auto Categories and Auto Articles was created by Omar Ramos
I've implemented some auto-categories menu and auto-articles menu for mod_k2_tools and mod_k2_content.Together with the Advanced Module Manager (for hiding empty modules) the modified modules I've attached add an additional "Automatic" mode.In mod_k2_tools, the new Automatic Category Menu is useful to show the immediate subcategories of the current category automatically.In mod_k2_content, the new Auto mode will show the articles for the current category, additionally it will continue to display the article list when you visit an article page.These two improvements aide tremendously in creating automatic navigation for a site and will be very useful in my situation, so I'm sure others will benefit as well.I sort of just hacked the features together so I can get going on my site, but I think you guys can clean it up and make it an included feature in a future revision.NOTE: This link may be useful if you notice that your template still sees a "phantom" column on the pages where the modules do not get displayed:http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=12858The issue is a problem with how Joomla counts its modules, which can mess up a template's display, but the above fix works very well (in addition to the Advanced Module Manager's Hide Empty Modules feature).
Attachments:

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

More
14 years 7 months ago #78397 by Simon Wells
Replied by Simon Wells on topic K2 Auto Categories and Auto Articles
I just ran a test on K2Joom.com using your files and just wanted to report back.

mod_k2_tools.
Select module functionality, Set to Category List Automatic Menu
Categories List (Automatic Menu) Settings, set to Yes
Select root category, set to my primary category, containing several sub, sub/sub cats.
Published to module position below content on home page only.
Saved

Visit home page, refresh, no change.
Hard refresh, no change.

Changed module position to "banner" as I know that this has significant change.
The banner module appears, but no content.

Inspect with Firebug, and no trace of K2_tools.

I then created another mod_k2_tools using the same folder, but this time setting up the Categories List (Menu).
Save and published to the same position, this loads.

These two examples are LIVE at the moment at k2joom.com/
They are only viewable on the home page to registered users only.

I have not tested the content_auto-articles.

K2Joom

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

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 7 months ago #78398 by Omar Ramos
Replied by Omar Ramos on topic K2 Auto Categories and Auto Articles
Hi K2Joom,

The automatic part does not depend on the root category setting.

The way it works is that it will automatically show a list of categories when you are on a K2 Category page so you want to leave the module enabled on "all" menu items. On a page that doesn't have option=com_k2 then the module will not display.

Here is a live example as well:
faculty.imperial.edu/omar.ramos (is showing the subcategories for the current category "Omar Ramos" and the articles for this category)
faculty.imperial.edu/andres.martinez (is not showing anything because this particular category "Andres Martinez" does not have any subcategories, nor does it have any articles yet)
I've enabled mod_k2_tools on all pages in the above site, but it only gets displayed when it needs to, making it really easy (once instructors start adding their own content) for them to create a simple navigation for their area, without requiring me to create 100+ instances of mod_k2_tools (one for each instructor).

I can send over some screenshots of the configuration if you still aren't able to get things working or even help to get it working on your demo site there.

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

More
14 years 7 months ago #78399 by Simon Wells
Replied by Simon Wells on topic K2 Auto Categories and Auto Articles
I checked, but both of those links are dead.

OK, I enabled for all menus and now auto cat works, it can be seen via the blog menu from the front page.

Omar Ramos said:Hi K2Joom, The automatic part does not depend on the root category setting.

The way it works is that it will automatically show a list of categories when you are on a K2 Category page so you want to leave the module enabled on "all" menu items. On a page that doesn't have option=com_k2 then the module will not display.

Here is a live example as well:
faculty.imperial.edu/omar.ramos (is showing the subcategories for the current category "Omar Ramos" and the articles for this category)
faculty.imperial.edu/andres.martinez (is not showing anything because this particular category "Andres Martinez" does not have any subcategories, nor does it have any articles yet)
I've enabled mod_k2_tools on all pages in the above site, but it only gets displayed when it needs to, making it really easy (once instructors start adding their own content) for them to create a simple navigation for their area, without requiring me to create 100+ instances of mod_k2_tools (one for each instructor).

I can send over some screenshots of the configuration if you still aren't able to get things working or even help to get it working on your demo site there.

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

  • Omar Ramos
  • Omar Ramos's Avatar Topic Author
  • Offline
  • Junior Member
More
14 years 7 months ago #78400 by Omar Ramos
Replied by Omar Ramos on topic K2 Auto Categories and Auto Articles
Glad it works now, the links shouldn't be dead (if you try again in a few minutes it'll probably work...most likely our external DNS servers are hiccuping...dodgy Windows machines :-).

I'm not sure where to look on the page (after clicking on the blog link), but I'm glad you were able to get things to work!

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

More
14 years 7 months ago #78401 by Simon Wells
Replied by Simon Wells on topic K2 Auto Categories and Auto Articles
Preparing for the next wave of questions will be, we want a horizontal list, change the bullets, show intro image thumbnail.

OK, time to sleep.

I will get these files added to K2Joom, reviewed etc.
Will test the auto articles shortly.

Omar Ramos said:Glad it works now, the links shouldn't be dead (if you try again in a few minutes it'll probably work...most likely our external DNS servers are hiccuping...dodgy Windows machines :-). I'm not sure where to look on the page (after clicking on the blog link), but I'm glad you were able to get things to work!

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

More
14 years 7 months ago #78402 by FeSys
Replied by FeSys on topic K2 Auto Categories and Auto Articles
Hello.. "Omar Ramos"..
The Idea is new and great for K2..
You start sharing something needed for main sized websites and Huge content Management portals.
I am happy to see your idea working "Omar Ramos".
Just keep the cool-ideas and of course your share.
Thank you.

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

More
14 years 7 months ago #78403 by Simon Wells
Replied by Simon Wells on topic K2 Auto Categories and Auto Articles
One very important thing to note, since I made that demo on K2Joom.
I now have a drop down menu appear in my cPanel location, in the top right of the page.
This is called k2CategorySelectBlock
Even after disabling the module, it still appears.

Is this coincidence that cat menu appears after adding the auto cat module?
It does not appear in my Module Manger, so it must be hard coded, the only change being from the auto cat module.

Knowing how to move this would be useful as to be honest, that kind of drop down category list could be useful to other, just not fixed in my cPanel ;)

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

More
14 years 7 months ago #78404 by Simon Wells
Replied by Simon Wells on topic K2 Auto Categories and Auto Articles
HUGE APOLOGIES!!!

There is NO problem - Developer Error!!

Simon hangs his head in shame for getting something wrong hahaha . . .

K2Joom said:One very important thing to note, since I made that demo on K2Joom.
I now have a drop down menu appear in my cPanel location, in the top right of the page.
This is called k2CategorySelectBlock
Even after disabling the module, it still appears.

Is this coincidence that cat menu appears after adding the auto cat module?
It does not appear in my Module Manger, so it must be hard coded, the only change being from the auto cat module.

Knowing how to move this would be useful as to be honest, that kind of drop down category list could be useful to other, just not fixed in my cPanel ;)

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

More
14 years 7 months ago #78405 by GreenDome
Replied by GreenDome on topic K2 Auto Categories and Auto Articles
Hello Omar,

How have you designed the 'List of Instructors' page? i.e. faculty.imperial.edu/index.php

I'm really interested in the Alpha Jump Links part?

Thanks
GD

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


Powered by Kunena Forum