Significance of a using colon in Joomla URL

2019-08-01 09:59发布

问题:

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.