I have 1 component with 2 views - default is view1 - secondary is view2.
When I associate it with the menu from the backend, Joomla creates the correct url with alias for SEO.
When from view1, I click the content and it goes to view2. To link it I use:
The complete url will be:
Everything works, but I would like to make the url
www.sitename.com/view2 and not
I wrote the router.php inside the component and register the name view.
$view1 = new JComponentRouterViewconfiguration('view1'); $view1 ->setKey('id'); $this->registerView($view1); $view2 = new JComponentRouterViewconfiguration('view2'); $view2 ->setKey('id'); $this->registerView($view2);
I created a legacyrouter file inside the helper folder,
but when inside function build I print the view
it always gives me
view1 even if in the url I wrote
I am not sure if the procedure is correct. In any case, how do I change the slug/alias?
There is no function like:
How do I change the slug?