Questions tagged [router]
The router creates and interprets nice Search Engine Friendly URLs
47 questions
0
votes
1
answer
69
views
Why does my article have the wrong URL?
I have a really weird issue that I haven't seen before. Obviously I am blaming the client.
On this page: https://tekexpress.co.uk/news?start=12 all of the articles click through.
But the "7 ...
0
votes
1
answer
202
views
Creating site routes from Administrator client
I am in the process of migrating a large Joomla component from v3.x (with lots of legacy code from 1.5+!) to Joomla 5 at present.
One item I have stumbled upon is how best to bootstrap the component's ...
1
vote
0
answers
136
views
Can I use uppercase in Joomla 4 url paths?
In Joomla 3 it was possible to use an URL of this form example.com/Essays/somethin-else because the router would match 'Essays' to the alias of an existing menu item (eg. 'essays, content, single ...
1
vote
0
answers
178
views
Why is my rewriterule not working in Joomla 4
I am using Joomla 4. I have a requirement to rewrite certain URLs to a specific article (article with ID 32). This worked OK with Joomla 3 but now I am getting unexplained error 404 using the same ....
0
votes
1
answer
396
views
Joomla 4 Router parse function
I'm converting a custom component from Joomla 3, where the component was using the legacy router, to Joomla 4 router. I have the router service set up and working on Joomla 4.4.0. I first tried ...
0
votes
1
answer
87
views
J4 -Custom Component - Router Unknown $pk in model
I've added Router Features today to my Custom Component - all works finde beside the fact that the $pk variable inside the model holds a curios value (202n) where 'n' is different for each element...
...
0
votes
1
answer
544
views
Route not working properly on J4?
I have a menu entry like so:
ID: 524
Type: Articles->Create Article
Link: index.php?option=com_content&view=form&layout=edit
In the "old days" I'do Route::_('index.php?option=...
0
votes
1
answer
200
views
Joomla 4 Router forward to Controller function
For a Joomla 4 component I just cannot figure out how to successfully forward or call a Controller function from within a custom Router.
This is the Controller - it basically loads an image:
<?php
...
0
votes
1
answer
152
views
Joomla 4 Component SEF URL not working for detail page of the item when catid is added in the url
Below is the have written the code router file in the component
namespace Test\Component\Test\Site\Service;
// No direct access
defined('_JEXEC') or die;
use Joomla\CMS\Component\Router\...
0
votes
1
answer
96
views
Using Legacy router while offering API access for own component
I think this could be a bit complicated. I have a non namespaced Joomla 4 component, but i need to have an API access for specific data.
So i created a /src directory in Backend with all needed ...
1
vote
1
answer
337
views
Joomla 4: no need for Route::_($url)?
I am using this on a custom component:
$url = index.php?option=com_content&view=article&catid=427&id=15106
Both
echo $url;
echo Route::_($url);
will output a friendly url.
I'm guessing ...
1
vote
0
answers
63
views
multiple parents in router for a view
i need have multiple parents for a view, for example:
view products list of all products with links to single product
view categories list of all categoires with links to single category
View ...
0
votes
0
answers
116
views
How to remove a parameter name from url with Joomla 4 router
My current working url is example.com/order/?id=abcd&pass=1234
I want url like example.com/order/abcd?pass=1234
After applying below codes in ROOT/components/com_shop/src/Service/Router.php
public ...
2
votes
1
answer
820
views
J4 component URL not SEF
Context: I have a component that works fine in J3 and I want to migrate it to J4.
Problem: When I create a menu (Joomla main menu) on the frontend view of the component, in J4 only, the URL is not SEF ...
2
votes
1
answer
308
views
Joomla 3.x routing and slug problem
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.
Example: www.sitename....