Keyword

Modifying the URL for items in 1 K2 Category

More
3 years 11 months ago - 3 years 11 months 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: 3 years 11 months ago by D.

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

More
3 years 10 months ago #177758 by JoomlaWorks
Replied by JoomlaWorks on topic Modifying the URL for items in 1 K2 Category
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.

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

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


Powered by Kunena Forum