Getting the ActionChild examples to work - help needed
Hi,
I'm new to Umbraco. Just started learning MVC and Razor, I want to add own "things" to the Umbraco CMS.
I've downloaded latest the latest source - 4.11.1. The projects will be edited with VS2012.
I had a closer look to the Documentation (the section Documentation on Our Umbraco), especially to Developer API Reference -> MVC -> ChildActions.
If I had understood that right, I can use ChildAction to render my own parts of code? Par examples I want to use my own MVC project, let's say, a simple form, where te user can input some text?
My questions are:
# What I have to do, so that i can use e.g. my own form in Umbraco? Which .dll i have to use for the controller class? This class has to inherit from SurfaceController, right?
I guess I have to write something like the following code into Umbraco -> Developer -> Scripting Files -> xyz.cshtml (Example-Code from the documentation site):
@Html.Action("SearchResults", "MySearch",
new { query = new QueryParameters(Request.QueryString["search"]) })
Does I have to write some @inherit or @using here? If so, which? And what does "MySearch" in the example code mean?
Further, if I take the example code from this site, where do i store it? In an umbraco folder or somewhere else?
If someone knows a link to a step-by-step example, i would be happy... At the moment the example-code is a mammut problem for me, because I don't know exactly what to do. Perhaps somebody might help me?
Hope my explainations and my englisch (not native) are understandable.
I've got it working so far, but getting the following error when i want to add the macro to a TextPage:
"System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
When disable the macro-option "Render content in editor", I get the follwing error when I display the Textpage:
Getting the ActionChild examples to work - help needed
Hi,
I'm new to Umbraco. Just started learning MVC and Razor, I want to add own "things" to the Umbraco CMS.
I've downloaded latest the latest source - 4.11.1. The projects will be edited with VS2012.
I had a closer look to the Documentation (the section Documentation on Our Umbraco), especially to Developer API Reference -> MVC -> ChildActions.
If I had understood that right, I can use ChildAction to render my own parts of code? Par examples I want to use my own MVC project, let's say, a simple form, where te user can input some text?
My questions are:
# What I have to do, so that i can use e.g. my own form in Umbraco? Which .dll i have to use for the controller class? This class has to inherit from SurfaceController, right?
I guess I have to write something like the following code into Umbraco -> Developer -> Scripting Files -> xyz.cshtml (Example-Code from the documentation site):
Does I have to write some @inherit or @using here? If so, which? And what does "MySearch" in the example code mean?
Further, if I take the example code from this site, where do i store it? In an umbraco folder or somewhere else?
If someone knows a link to a step-by-step example, i would be happy... At the moment the example-code is a mammut problem for me, because I don't know exactly what to do. Perhaps somebody might help me?
Hope my explainations and my englisch (not native) are understandable.
Thanks in advance for your help, Kai
UPDATE:
I've got it working so far, but getting the following error when i want to add the macro to a TextPage:
"System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
When disable the macro-option "Render content in editor", I get the follwing error when I display the Textpage:
"Error loading MacroEngine script (file: test.cshtml)"
Any suggestions?
Now I'm using mvcBridge; works fine for me.
is working on a reply...