Keyword

Only use the last category in URL

  • Ruth Cheesley
  • Ruth Cheesley's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 10 months ago #90778 by Ruth Cheesley
Only use the last category in URL was created by Ruth Cheesley
Hi guys,I wonder if anyone can advise me if it's possible to only show the last category in a URL rather than using all the nested categories above it?For example, I have:General News  Politics  EnvironmentIf an article is in the Politics category I want it to display as www.mysite.co.uk/Politics/articletitle.html but at the moment it shows as www.mysite.co.uk/General_News/Politics/articletitle.html.Quite important as I'm moving from an old site so need the URLs to be the same as the old site.I'm using sh404 to manage my site-wide SEF URL's if that helps?  I know it's possible to exclude section from the URL under the Joomla tab of extension configurations but there is no K2 tab :)Ruth

Ruth Cheesley
Virya Technologies

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

More
13 years 10 months ago #90779 by Alan Sparkes
Replied by Alan Sparkes on topic Only use the last category in URL
Hey Ruth
No good simple answer here.
You might be able to create custom urls in Sh404
 but youd be doing it for each article.

Htaccess might help to dynamically rewrite / strip out general bit.

You could sleds move the categories up to their root?

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

  • Ruth Cheesley
  • Ruth Cheesley's Avatar Topic Author
  • Offline
  • Senior Member
More
13 years 10 months ago #90780 by Ruth Cheesley
Replied by Ruth Cheesley on topic Only use the last category in URL
Hi Alan,

I can't move the categories out of their top level categories as they create core pages for the site - all news articles for example - but will have a think if I might be able to do it differently. Had hoped it might be a simple thing I'd missed like "only use the last category" switch somewhere, but clearly not :(

Ruth

Ruth Cheesley
Virya Technologies

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


Powered by Kunena Forum