How to Create Startup Page Custom module .cshtml in Orchard

﹥>﹥吖頭↗ 提交于 2019-12-13 05:07:34

问题


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

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.

Is it Possible? Please help me.


回答1:


Enable the aliasUI feature in Modules section

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 ^_^

EDIT:

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

/

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.




回答2:


i solve this problem .please follow these steps:-

  1. Login with Admin and open dashboard page.

  2. Enable Aliases Module.

  3. Click on Aliases Link left on dashboard page.

  4. Edit first Aliase (top most) change only RoutePath write your module name

/controllername(Mymodule/home)

after that it will be your startup



来源:https://stackoverflow.com/questions/19542580/how-to-create-startup-page-custom-module-cshtml-in-orchard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!