Joomla在模块中检索当前路线
This is something I feel should be easy, but after an hour so far scouring the web it just does not seem to be jumping out.
What I want is to have a module trigger a task in a component, then redirect to the last page.
To do this I want to get the current route in the modules form. However I cannot find any Joomla function that can output the current pages "JRoute", if I try use JRoute with no parameters it just outputs the url with no query, so will every method of JURI.
There must be an obvious answer to this, however for some reason I might just not be searching for the right thing and not turning up any results.
这是我觉得应该很容易的事情,但是到目前为止一小时后在网上搜索它似乎似乎没有 跳出来。 p>
我想要的是让模块触发组件中的任务,然后重定向到最后一页。 p>
要做什么 我希望以模块形式获取当前路由。 但是我找不到任何可以输出当前页面“JRoute”的Joomla函数,如果我尝试使用没有参数的JRoute它只输出没有查询的url,那么JURI的每个方法都是如此。 p> 必须有一个明显的答案,但由于某种原因,我可能只是没有找到正确的事情,也没有提出任何结果。 p> div>
Try:
JURI::getInstance()->toString()
This will give you the current url.