orchardcms 1.6 - Orchard custom admin page -
i add new part orchard administration area,
i need iframe in part, shows page in website.
*page, , other custom content type not need.
is possible create that?
thanks,
nadavst
perfectly possible.
you need custom module. controller called admincontroller.
add method called index , new view in views folder called index.cshtml , whatever want in there.
public actionresult index() { //do stuff... return view(); } then create link in menu, add file called adminmenu.cs in root of module following.
public class adminmenu : inavigationprovider { public localizer t { get; set; } public string menuname { { return "admin"; } } public void getnavigation(navigationbuilder builder) { builder .add(t("my admin area"), "4", item => item.action("index", "admin", new { area = "orchard.mymodule" }).permission(standardpermissions.siteowner)); } } so creates item in menu called "my admin area" @ position 4 links method called index in admin controller. can add permissions item appears users permission. make sure protect action in controller well.
i recommend checking random core modules see how stuff, best way see how things work , examples. modules implement functionality after.
good luck :)
Comments
Post a Comment