Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jroute]

The tag has no usage guidance.

1
vote
0answers
22 views

What is the purpose of cloning JUri in the CMSApplication route method?

CMSApplicationWhen Joomla does its initial routing in Joomla\CMS\Application\CMSApplication in the route method, the JUri object is cloned. The line is: $uri = clone \JUri::getInstance(); Looking at ...
0
votes
1answer
63 views

“JRoute::_” generating two different urls for same link

So I have this weird problem. I am calling JRoute::_('index.php?option=com_example&view=foo&layout=bar') ..from two different view-layouts. And Joomla! is generating different SEF-URL ...
2
votes
1answer
163 views

Generating URL in CLI

Can anybody shed some light how to generate an url in Joomla command-line application. Seems that budget was cut off at Joomla routing development because: JRoute::_('index.php?option=...
1
vote
0answers
35 views

Joomla BuildRule adds language code at the back of setPath

I'm having a problem with building the rule for a particular URL. Here's what I have in my system plugin: //... function onAfterInitialise() { require_once '/path/to/myhelper.php'; $router = $...
0
votes
1answer
172 views

Different views on router.php (Joomla! 3.6.4)

I am developing my second custom component for Joomla! 3.6.4 and I have another problem with my router.php. This time I need to dynamically change the view on my router.php but I don’t know how to do ...
2
votes
1answer
340 views

JRoute::_('index.php') no longer adds Itemid since Joomla 3.8.4

I have a custom component that handles generates a page containing a list of events, and a page giving details for the event. Previously, I would have one menu item setup to handle the list page: ...
1
vote
1answer
254 views

Joomla! 3.6.4 router.php for a custom component

I am developing a custom component for Joomla! for the first time and I am stuck on the creation of a router.php. I alredy read the Joomla! Documentation but without clearly understand what to do. ...
1
vote
0answers
49 views

How to check if Joomla path is routable

Is there any way to see if a path will route to a component preferably without dispatching it? I can't use CURL or get_headers to see if the status is 200. In other frameworks you can tap into the ...
1
vote
3answers
753 views

Create SEF URLs from a Custom Component that does not search on database

I am creating a custom component that will get data by json from another url. So far it works good but I am having some difficult trying to apply a SEF URL with a router.php file. Example, current ...
1
vote
1answer
402 views

Need some help by custom component routing and menupoints

I am trying to write a custom component router. I have these admin and site uri structures: http://localhost/administrator/index.php?option=com_{component_name}&... and http://localhost/index.php/{...
1
vote
1answer
151 views

[com]BuildRoute(&$query) function is called with no $query['view'] member passed

I am writing a component for site side and having some troubles with router. I have 2 views in one component, both them have only one default.php template and default.xml to define menu type for each ...
1
vote
3answers
3k views

Absolute SEF url with JRoute

I'm trying to figure out why I can't get a correct absolute SEF url with JRoute. I tried with this: JRoute::_(JUri::root().'index.php?Itemid=164') but it won't correctly SEF render it, it will just ...
0
votes
1answer
649 views

Problem with JRoute::_ and ajax data

I'm making a custom component in Joomla! 3. Let's call it TestCom (com_testcom). What I want is to add to items view a simple searching and filtering engines. For this I've created additional, raw ...
1
vote
2answers
341 views

SEF URL using router without id in the URL

Non SEF URL http://www.example.com/index.php?option=com_yourcomponent&view=article&id=20&Itemid=50 SEF URL http://www.example.com/example-menu-item/20 Is it possible to create SEF ...
2
votes
2answers
400 views

How to remove IDs from SEF URL in Joomla?

I 'm writing a custom component and I already get done the router.php: defined('_JEXEC') or die; function empresaBuildRoute(&$query) //Esta función divide la url y se trae las variables. { $...
1
vote
1answer
52 views

Component doesn't use route Joomla 2.5.28

I'm doing some work on an old joomla website which I can't upgrade at the moment. I have booking component that has a search module which than redirects to component url like this: mysite.com/...
2
votes
2answers
399 views

How to change url scheme of Search component?

How can I change the url scheme appearing for Search Component in Joomla. When a search is done url goes like: http://localhost/joomlaproject/component/search/?searchword=destination&...
3
votes
2answers
1k views

Using JRoute in the backend? Almost figured it out, help needed

I needed to get JRoute working in backend so that from admin I can create an event with my event component and have an email sent that contains the SEF url. After researching, I found some tips that ...
1
vote
0answers
70 views

Domain url formed issue

I have a problem with how the internal links of a website are formed while using the JRoute class. Instead of them being in the following format: www-mydomain-gr/[the rest of the url] they are ...
5
votes
1answer
119 views

Compose URL from its parts

Is there a method to create URL from different parameters? For example, from: id=1 option=view task=delete to: index.php?id=1&option=view&task=delete
1
vote
0answers
327 views

Remove /components/ from Popular Tags Cloud module

I have set up a page called domain.com/tags.html on the root which links to the com_tags component and shows a set of tags most used. I also want to use the Popular tag cloud module, mod_tags_popular,...
0
votes
2answers
422 views

Ajax request 303 redirect on a multilingual website

I have an ajax task to return a form token from my controller for use in ajax pages, so that subsequent ajax requests will have a token. It looks like this in the code: JURI::root().'index.php?option=...
2
votes
3answers
1k views

Joomla 3 with k2 sef url issue

I have an issue with k2 sef settings. I want all items to have no category structure, example: http://example.com/cat1/cat2/item1 -> http://example.com/item1 I found the setting: Prefix for item ...
2
votes
1answer
1k views

Paginated links on items generated using a custom search module does not work

I am trying to build a component called com_usedbooks with a module called mod_usedsearch. The user can view books by clicking a Menu Item called 'Used Books' (/used-books) which will show a paginated ...
7
votes
3answers
4k views

404 HTTP codes in Joomla

how do you make Joomla return a "real" 404 code? I can't figure out how to make this happen! I have changed htaccess.txt to .htaccess, enabled the system / redirect plugin, and turned on rewrite URLs ...
2
votes
1answer
76 views

Is this a route loop?

Our site (Joomla 2.5.8) is using the Document Seller component/module (I'm not clear on the proper use of these terms in the Joomlaverse) to categorize and sell a series of PDF documents. The ...
1
vote
1answer
346 views

Attributing Itemid to article when opened from a “Tagged Items” pages

I am struggling with the tag component. 1) When I click on the title of an article from the component/tags/tag/MyTag page, then I am redirected to a page with the home itemid. This is a big issues ...
4
votes
1answer
719 views

Link to content article with specific layout

I'm trying to link to a content article and force a specific layout override to be used in the display, however I'm having some troubles. I've tried the following: JRoute::_("index.php?option=...
14
votes
4answers
13k views

How to get Itemid by URL and pass it to JRoute

I have a menu item for a specific view in a custom component. Attached to this menu item I have another Template Style selected, not the standard template. Accessing the view via the menu works well, ...