问题
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