Significance of a using colon in Joomla URL

随声附和 提交于 2019-12-11 11:57:10

问题


I need to know, if joomla gives any significance to a colon in within component or view?

Is there something in this naming convention?


回答1:


The colon is only used in the 'id' parameter to separate the numeric id from the slug used for SEF URLs. With view & component names you should not use any colons.

Eg: Non-sef URL - /index.php?option=com_content&view=article&id=45:my-article-title
Sef URL - /my-article-title.html

Also when actually using the id, you should only use the numeric part, which can be extracted using JRequest::getInt('id') in your code.



来源:https://stackoverflow.com/questions/7862887/significance-of-a-using-colon-in-joomla-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!