Have you tried to follow Pauls guide?
http://world.episerver.com/Blogs/Paul-Smith/Dates1/2011/8/Creating-EPiServer-AdminEdit-Plug-ins-using-MVC/
What I'm usually doing for this kind of tasks is to add support for single file deployments - controllers, views, etc are bundled together into one .dll file as embedded resources and served by specially registered provider. You can try to sneak some cheats if interested in one of my plugins - http://tech-fellow.net/2013/10/17/overview-episerver-scheduled-jobs-interactively/
yes Henrik I did andI got the same thing as the guy who posted the last answer
thank you Valdis I was trying to avoid having to create a separate dll for this, but if there is no other way I guess I'll have to
It's not that you have to create a separate .dll file for the project. You code is packed in .dll file already anyway. Idea is that you dopn't need to deal with separate files for views, scripts, etc. Everything is embedded inside your main .dll file. It makes testing and debugging addon so much easier - you just drop new .dll file version in your target testing app and debug :) This is really an optional step to take not a prerequisite.
Yeah that's exactly the issue. My code is indeed inside the main dll, the problem is that it cannot route the request properly. That's what I am struggling with it and I don't know enough about EPI server to make it work. That's why I am getting a 404 instead of seeing something. If I can make epi server route the request properly then the issue is solved.
It's not meant to be an add-on, this is something very specific to a project and it won't get reused. This is why I left inside the main project, there's no need for it to be built outside of it.
I'm trying to create my very first MVC based admin plugin for EPiServer 7.5+... Now how can I reuse the nice EPiServer GUI buttons in my code?
In the plugin, the administrator should be able to select a file (using the EPiServer file picker) and a location where s/he wants to create some global blocks.
Suggestions, anyone?
You may achieve this by adding the Episerver system styles as partial view, Anders:
@using EPiServer.Framework.Web.Resources
@*
- Renders necessary Episerver system styles
----------------------------------------------------- *@
@Html.Raw(ClientResources.RenderResources("ShellCore"))
@Html.Raw(ClientResources.RenderResources("ShellWidgets"))
@Html.Raw(ClientResources.RenderResources("ShellCoreLightTheme"))
@Html.Raw(ClientResources.RenderResources("Navigation"))
@Html.Raw(ClientResources.RenderResources("DojoDashboardCompatability", new[] { ClientResourceType.Style }))
@Html.Raw(ClientResources.RenderResources("system"))
Then refer to this as partial view ( @Html.Partial("~/Views/Shared/yourname.cshtml") ). Then you may use the Episerver guidelines to your service:
Ok, here's what I am trying to do.
I have a page with a listing of companies let's say.
The data itself is coming from the dynamic data store, but that's irrelevant at this stage,
I want the admins to be able to add new companies data.
So I thought I'd create an admin plugin ( mvc ) to get this to work.
I have been unable to get this plugin to work, here's what I did so far:
I created a new controller called MyExamplePluginController - random name. This controller resides in the normal controllers folder.
The namespace for this class is XX.YY - let's say.
Then I decorated it with this :
[EPiServer.PlugIn.GuiPlugIn(
Area = EPiServer.PlugIn.PlugInArea.AdminMenu,
Url = "/modules/XX.YY/MyExamplePlugin/Index",
DisplayName = "Company Add Plugin"
)]
I then went and created the folder XX.YY in modules. In that folder I then placed an Index.cshtml view.
At this point if I login to the admin section of the cms I can see my plugin listed. When I click on the link though it throws a 404.
I cannot get this to work in any way shape or form so any ideas are more than welcome at this stage.
I tried to put the controller in the same folder with the view. Didn't help at all.
What am I missing ?
Also please don't point me at any allow resources, I've already been through all the articles and found that they didn't help.