在Joomla URL中使用冒号的意义 [英] Significance of a using colon in Joomla URL

查看:118
本文介绍了在Joomla URL中使用冒号的意义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道joomla是否对组件或视图中的冒号有任何意义?

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

此命名约定中有内容吗?

Is there something in this naming convention?

推荐答案

仅在'id'参数中使用冒号,以将数字ID与用于SEF URL的段分开.与视图和组件名称,您不应使用任何冒号.

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.

例如: 非安全网址-/index.php?option=com_content&view=article&id=45:my-article-title
Sef网址-/my-article-title.html

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

此外,在实际使用id时,您仅应使用数字部分,可以使用代码中的JRequest::getInt('id')提取数字部分.

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

这篇关于在Joomla URL中使用冒号的意义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆