简体   繁体   English

Joomla组件+友好的URL

[英]Joomla component + friendly url

I'm new at Joomla. 我是Joomla的新手。 I just had made my first component and module. 我刚刚制作了第一个组件和模块。 I use _GET parameters such as 'page', 'nr' and 'q' (q contains _POST parameters in base64) because I made my own pagination. 我使用_GET参数,例如“ page”,“ nr”和“ q”(q在base64中包含_POST参数),因为我进行了自己的分页。 So, when I try to use it on Joomla it works fine and the url without SEF looks like this: 因此,当我尝试在Joomla上使用它时,它可以正常工作,并且没有SEF的网址如下所示:

http://mydomain/?option=com_mycomponent&view=test&page=0&q=[base64] http:// mydomain /?option = com_mycomponent&view = test&page = 0&q = [base64]

But what I want is to make it friendly. 但是我要使它变得友好。 I think it should something like this: 我认为应该是这样的:

http://mydomain/component/mycomponent/view/test/page/0/q/[base64] http:// mydomain / component / mycomponent / view / test / page / 0 / q / [base64]

I enabled SEF in joomla and when I print JRequest::get('get') it just appear option and itemid parameters. 我在joomla中启用了SEF,当我打印JRequest :: get('get')时,它只显示optionitemid参数。 What should I do to get the rest of them? 我应该怎么做才能得到其余的?

Thanks in advance. 提前致谢。

You should define routing in your component. 您应该在组件中定义路由。 That should give joomla what it needs to output what you're requesting. 那应该给joomla提供输出您所需要的东西的需求。 http://docs.joomla.org/Supporting_SEF_URLs_in_your_component http://docs.joomla.org/Supporting_SEF_URLs_in_your_component

There are also other SEF plugins that attempt to do this across your whole Joomla site, but they don't always work 100%. 也有其他SEF插件试图在您的整个Joomla网站上执行此操作,但并非总是100%起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM