如何创建在乌节启动页面自定义模块.cshtml [英] How to Create Startup Page Custom module .cshtml in Orchard

查看:137
本文介绍了如何创建在乌节启动页面自定义模块.cshtml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的果园1.7,我想从我的自定义模块使起始页。

I am using Orchard 1.7 and I want to make start page from my custom module.

我创建了一个名为MyModule的一个模块,并在它的视图文件夹我有* .cshtml与名称指标。我想设置索引页为我的网站的启动页。这意味着第一页将Index.cshtml从MyModule的。

I've created a module with name MYMODULE and under it's view folder I have *.cshtml with name Index. I want to set Index page as a startup page of my site. It means first page will be Index.cshtml from MYMODULE.

是否有可能?请帮我。

推荐答案

启用模块部分aliasUI功能

Enable the aliasUI feature in Modules section

添加指向/ MyModule的/一个myController的空白路线,它应该工作。可能必须删除当前的主页网址。也许这不是空白而是一个/。我不记得^ _ ^

Add a blank route that points to /MyModule/MyController and it should work. May have to delete the current homepage url. And maybe it isn't blank but a "/". I cant remember ^_^

编辑:

检查此链接了:的http://davidhayden.com/blog/modifying-orchard-permalinks-after-publishing-content-items现在,如果你按照说明修改的网址,你会看到一个名为别名

Check this link out: http://davidhayden.com/blog/modifying-orchard-permalinks-after-publishing-content-items Now if you follow the instructions to modify urls, you will see an alias called

/

这可能会链接到你的欢迎页面乌节路,即得。 /内容/项目/显示/ 12或东西。编辑在您的自定义页面,点这条路线。

This will probably link to your Welcome to Orchard page route, ie. /Contents/Item/Display/12 or something. Edit this route to point at your custom page.

这篇关于如何创建在乌节启动页面自定义模块.cshtml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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