Keyword

Modifying the URL for items in 1 K2 Category

More
1 month 2 days ago - 1 month 2 days ago #177697 by D
Hi.

We are using a K2 Menu Module to generate a list of links to display k2 items from a couple of categories on a page our web site.

So when a user visits our page, a portion of that page shows 5 of the most recent k2 items pulled from a k2 Category called "presidents" and then 2 subcategories.

We want to change the URL's for only the k2 items in the Presidents Catgeory or, more specifically, all items within the 2 subcatgories of Presidents.

For example we currently have url's that look like this:

oursite.com/index.php/kennedy/item/kennedy-k2item.html

oursite.com/index.php/jefferson/item/jefferson-k2item.html

Those k2 items are currently located under the k2 category "Presidents" and then in additional Categories for each President in the joomla backend like this:

k2/Categories/Kennedy/kennedy-k2item

k2/Categories/Jeffereson/jefferson-k2item.html

We want the URL's to now be this:

/index.php/presidents/kennedy/item/kennedy-article.html

/index.php/presidents/jefferson/item/jefferson-article.html

Thus showing the top category name "presidents" in the url. But we want this only for items in the "presidents" category. All other URL's would remain unchanged.

I see I can accomplish something similar using K2's SEO settings.

I can manually enter the word Presidents in the "Custom prefix for item URL's" field and that gets me close.

But that changes the URL for every k2 item on our site and that's not what we want.

We would be happy with just manually entering the word we want inserted into the url as described above but as I said that's not quite what we want

Given that the links are autogenerated by the Module how might we accomplish this?

Any advice is greatly appreciated!
Last edit: 1 month 2 days ago by D.

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

  • Fotis
  • Fotis's Avatar
  • Offline
  • Administrator
  • JoomlaWorks Support Team
More
3 weeks 10 hours ago #177758 by Fotis
It's best to disable K2's "Advanced SEF" option and just create a hidden menu item pointing to the "Presidents" category. You'll get these URLs then.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum