- Posts: 2
COMMUNITY FORUM
K2 Auto Categories and Auto Articles
- valkyria
- Offline
- New Member
Less
More
13 years 9 months ago #78426
by valkyria
Replied by valkyria on topic K2 Auto Categories and Auto Articles
This is a great addition to the K2 component! Both modules work great.
Now as mentioned before, there's no itemID when following the links created in the auto list, so articles/sub-category lists are shown with the default or current (main page/Home) templates and modules positions. Eg: I've got the slideshow module to show only on the main page, but following a link from this auto module, the slideshow appears anyway.
Is there a way to add this, even a hard coded solution will do for me now, I can create a generic layout itemID.
Now as mentioned before, there's no itemID when following the links created in the auto list, so articles/sub-category lists are shown with the default or current (main page/Home) templates and modules positions. Eg: I've got the slideshow module to show only on the main page, but following a link from this auto module, the slideshow appears anyway.
Is there a way to add this, even a hard coded solution will do for me now, I can create a generic layout itemID.
Please Log in or Create an account to join the conversation.
- Markus Thiel
- Offline
- Premium Member
Less
More
- Posts: 149
13 years 9 months ago #78427
by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
Well actually this is not a bug in the module...The problem is that you need to create menu items to all the categories :/
At least that fixed it for me.. took some time (have about 300 categories hehe) but it worked :)
valkyria said:
This is a great addition to the K2 component! Both modules work great.
Now as mentioned before, there's no itemID when following the links created in the auto list, so articles/sub-category lists are shown with the default or current (main page/Home) templates and modules positions. Eg: I've got the slideshow module to show only on the main page, but following a link from this auto module, the slideshow appears anyway.
Is there a way to add this, even a hard coded solution will do for me now, I can create a generic layout itemID.
At least that fixed it for me.. took some time (have about 300 categories hehe) but it worked :)
valkyria said:
This is a great addition to the K2 component! Both modules work great.
Now as mentioned before, there's no itemID when following the links created in the auto list, so articles/sub-category lists are shown with the default or current (main page/Home) templates and modules positions. Eg: I've got the slideshow module to show only on the main page, but following a link from this auto module, the slideshow appears anyway.
Is there a way to add this, even a hard coded solution will do for me now, I can create a generic layout itemID.
Please Log in or Create an account to join the conversation.
- Marty Peet
- Offline
- Premium Member
Less
More
- Posts: 84
13 years 6 months ago #78428
by Marty Peet
Replied by Marty Peet on topic K2 Auto Categories and Auto Articles
Hey I created something like this not long ago, not as good as Omar's but someone might find it useful
Publish the module in whatever position you like, CSS needs a class named menu. If you don't like that class name, or already have it, hack the default.php file in the tmpl folder. If you browse to a directory that contains sub-directories it will create a list of them with their titles as the links. The parent category name becomes the menu title. If you're in a sub-directory that contains articles, it'll create a list of those articles using their titles as links.
That's about all it does, but it's saved me massive amounts of time. Enjoy
Publish the module in whatever position you like, CSS needs a class named menu. If you don't like that class name, or already have it, hack the default.php file in the tmpl folder. If you browse to a directory that contains sub-directories it will create a list of them with their titles as the links. The parent category name becomes the menu title. If you're in a sub-directory that contains articles, it'll create a list of those articles using their titles as links.
That's about all it does, but it's saved me massive amounts of time. Enjoy
Please Log in or Create an account to join the conversation.
- Third Sun Productions
- Offline
- Junior Member
Less
More
- Posts: 32
13 years 5 months ago #78429
by Third Sun Productions
Replied by Third Sun Productions on topic K2 Auto Categories and Auto Articles
Hi Marty - thanks for providing this module, its just what I need. One questions - It seems to be creating URLs to a static itemID of 198 - can that be changed to link to whatever the current itemID is? Thanks again
Marty Peet said:
Hey I created something like this not long ago, not as good as Omar's but someone might find it useful
Publish the module in whatever position you like, CSS needs a class named menu. If you don't like that class name, or already have it, hack the default.php file in the tmpl folder. If you browse to a directory that contains sub-directories it will create a list of them with their titles as the links. The parent category name becomes the menu title. If you're in a sub-directory that contains articles, it'll create a list of those articles using their titles as links.
That's about all it does, but it's saved me massive amounts of time. Enjoy
Marty Peet said:
Hey I created something like this not long ago, not as good as Omar's but someone might find it useful
Publish the module in whatever position you like, CSS needs a class named menu. If you don't like that class name, or already have it, hack the default.php file in the tmpl folder. If you browse to a directory that contains sub-directories it will create a list of them with their titles as the links. The parent category name becomes the menu title. If you're in a sub-directory that contains articles, it'll create a list of those articles using their titles as links.
That's about all it does, but it's saved me massive amounts of time. Enjoy
Please Log in or Create an account to join the conversation.
- Marty Peet
- Offline
- Premium Member
Less
More
- Posts: 84
13 years 5 months ago #78430
by Marty Peet
Replied by Marty Peet on topic K2 Auto Categories and Auto Articles
Edit the default.php file in the tmpl folder, line 51. Not sure which variable is the container for the current item probably id by the look of the k2_items table, so swap the Itemid=198 to Itemid='.$v.id' and see how that works I suppose... good luck!!!
Please Log in or Create an account to join the conversation.
- datshay
- Offline
- New Member
Less
More
- Posts: 13
13 years 4 months ago #78431
by datshay
Replied by datshay on topic K2 Auto Categories and Auto Articles
Hay can u help me to do same with categories.... i mean in the above module u have fetched the items, instead can i fetch the categories.... please help me....
thanks
thanks
Please Log in or Create an account to join the conversation.
- Marty Peet
- Offline
- Premium Member
Less
More
- Posts: 84
13 years 4 months ago #78432
by Marty Peet
Replied by Marty Peet on topic K2 Auto Categories and Auto Articles
Hey Datshay
Not entirely sure what you want here...
If you read my description of the module that is what it's supposed to do, if the category has items, list the items, if the category has sub-categories, list the categories. Shouldn't be to difficult to locate the if statement and break it out into blocks so that it can/does display both categories and items? or to comment out the categories display altogether
datshay said:
Hay can u help me to do same with categories.... i mean in the above module u have fetched the items, instead can i fetch the categories.... please help me....
thanks
Not entirely sure what you want here...
If you read my description of the module that is what it's supposed to do, if the category has items, list the items, if the category has sub-categories, list the categories. Shouldn't be to difficult to locate the if statement and break it out into blocks so that it can/does display both categories and items? or to comment out the categories display altogether
datshay said:
Hay can u help me to do same with categories.... i mean in the above module u have fetched the items, instead can i fetch the categories.... please help me....
thanks
Please Log in or Create an account to join the conversation.
- Markus Thiel
- Offline
- Premium Member
Less
More
- Posts: 149
13 years 2 months ago #78433
by Markus Thiel
Replied by Markus Thiel on topic K2 Auto Categories and Auto Articles
Is there any way to show the parent category?
Because when you are in an item the module is just empty :P
Because when you are in an item the module is just empty :P
Please Log in or Create an account to join the conversation.