flashesb4
flashesb4

Reputation: 1

Can I change the joomla router for the canonical url of some categories?

I have a few hundred articles that belong in 3 categories which are nested in a main one. The sef url which is produced by joomla goes like this

mydomain.com/ (menu item alias for the top level category that nests the 3)/ (the articles parent category id and alias)/ (article id and alias)

I want all articles url to have this structure mydomain.com/ (menu item alias for the top level category3)/ (article id and alias)

without having to create seperate menu items for all of them

the second url already works (since there is a menu item for a blog with the top category) but it's not the default one (that joomla outputs on links to the article, the article's head as well as the

is there any way to change the router php file and do this? or at least modify the main helper files that produce the output and

Upvotes: 0

Views: 463

Answers (1)

Jiwoks
Jiwoks

Reputation: 559

You can create a custom system plugin. Here is the Joomla documentation : http://docs.joomla.org/Creating_a_System_Plugin_to_augment_JRouter

With two methods you can :

  • alter the url generation
  • Parse the requested url to redirect to the content you want

Upvotes: 0

Related Questions