doukui4836 2014-01-25 17:20
浏览 34
已采纳

的Joomla! 重写动态网址

I am working in a component to Joomla! 3 but I am having a litle issue.

I have this: $primary_link->setUrl(JRoute::_('index.php?option=com_sweetmail&task=item&item_id=' . $item->getId(), false)); that creates URL something like: http:://www.mysite.com/component/sweetmail/item/example.

What I am trying to do is rewrite JRoute dynamically, to delete /component/sweetmmail/item

Is this possible?

  • 写回答

1条回答 默认 最新

  • douqianbiao4216 2014-01-25 22:01
    关注

    You will need a router.php for the sweetmail component. Currently you don't have one. Check the router.php under the com_banners component to see how it's done. Essentially you will need to to create and to parse the URL. Not that complicated.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏