Keyword

Categories Routes :-(

  • Javi Mata
  • Javi Mata's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 7 months ago #151512 by Javi Mata
Categories Routes :-( was created by Javi Mata
I, i'm create a Module for a list of categories but i have problems with the routes, i try use the Route.php native of K2 and use this:

$item->categoryLink = JRoute::_(K2HelperRoute::getCategoryRoute($item->id.':'.urlencode($item->alias)));

and i receive this: web.com/emprendimiento/itemlist/category/2-emprendimiento

where emprendimiento is the alias and 2 the id, this is ok but i need just see web.com/emprendimiento

what need change or what can i do it? thanks

Twitter: @Javi_Mata
Web: www.javimata.com

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

More
8 years 7 months ago #151516 by Lefteris
Replied by Lefteris on topic Categories Routes :-(
Hi,

You need to either create a menu link to this category or enable the advanced SEF in K2 parameters. Note that in the second case, all the K2 links of your site will changed, not just the categories links.

Let me know if you need more help.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Javi Mata
  • Javi Mata's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 7 months ago #151542 by Javi Mata
Replied by Javi Mata on topic Categories Routes :-(
i have a menu with this categories, how can i get the real link or the menu link for each category in my module?

thanks

Twitter: @Javi_Mata
Web: www.javimata.com

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 7 months ago #151546 by Krikor Boghossian
Replied by Krikor Boghossian on topic Categories Routes :-(
The link (since each category is mapped to a separate menu item) should be automatically generated from that module.

If the module is not picking the route correctly, you need to contact the module's developer.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Javi Mata
  • Javi Mata's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 7 months ago #151548 by Javi Mata
Replied by Javi Mata on topic Categories Routes :-(
i'm the module developer :-S

Twitter: @Javi_Mata
Web: www.javimata.com

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 7 months ago #151549 by Krikor Boghossian
Replied by Krikor Boghossian on topic Categories Routes :-(
If that's the case (kudos as well for developing for K2) you can base your module on our K2 Content module. There is no need to reinvent the wheel :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Javi Mata
  • Javi Mata's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 7 months ago #151557 by Javi Mata
Replied by Javi Mata on topic Categories Routes :-(
i need select some categories and show the title and description for the selected categories and i can't do it with the K2 Content Module

Twitter: @Javi_Mata
Web: www.javimata.com

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

  • Javi Mata
  • Javi Mata's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 7 months ago #151598 by Javi Mata
Replied by Javi Mata on topic Categories Routes :-(
i don't know if this is try to reinvent the wheel, i can't do it with the preset modules

i put my custom module based in the k2_content, in this put the route directly using the alias :-S

github.com/javimata/mod_k2_categories

Twitter: @Javi_Mata
Web: www.javimata.com

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

More
8 years 7 months ago #151604 by Lefteris
Replied by Lefteris on topic Categories Routes :-(
@Javi Mata

You are passing the item id in the function getCategoryRoute while it expects the category id.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Javi Mata
  • Javi Mata's Avatar Topic Author
  • Offline
  • Senior Member
More
8 years 7 months ago #151613 by Javi Mata
Replied by Javi Mata on topic Categories Routes :-(
i create the query for a categories list and save the result in $items, so, in the foreach $item->id is the category id really?

Twitter: @Javi_Mata
Web: www.javimata.com

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


Powered by Kunena Forum