, but couldn't understand where I can find the "old" scripts in order to create the new ones under the MVC macros? Is there any guide? Like, where I find the "old" code? After creating the new scrips - should I delete the old scripts?
Hi Dennis,
Thanks. Found it. Now have "new" problems though - get lot of errors ... - the scripts apparently doesn't work as "MVC Partial views Macro Files" .
Here's some of the code I'm using in the "old" Razor scripts:
@using umbraco.NodeFactory;
dynamic MyMagazine_node = Library.NodeById(1023);
var Magazine_pagesToList = @MyMagazine_node.Children.Where("Visible");
Magazine_pagesToList = Magazine_node.DescendantsOrSelf().Where("NodeTypeAlias == @0", "NewsPage");
Node get_feature_story = new Node(1432);
string MainNewsStr = get_feature_story.GetProperty("mainNewsItem").Value;
int MainNewsID = Convert.ToInt32(MainNewsStr);
var feature_story_HP = Model.NodeById(MainNewsID);
There are more - for now, this a script that doesn't work - what's wrong?
Thanks.
How to convert old dynamicNode razor scripts to partial views
Hey, just updated to U7 2.x, and need to update one of my Razor scripts - but didn't find them. Then I've find this topic: https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/59874-Razor-in-U7Am-I-just-over-tired
, but couldn't understand where I can find the "old" scripts in order to create the new ones under the MVC macros? Is there any guide? Like, where I find the "old" code? After creating the new scrips - should I delete the old scripts?
Pls advise. Thanks.
Hi Meni,
If you look at the file structure for your Umbraco installation on the server did you still see the Scripting file folder?
If then your files should still be in this folder :-)
Hope this helps,
/Dennis
Hi Dennis, Thanks. Found it. Now have "new" problems though - get lot of errors ... - the scripts apparently doesn't work as "MVC Partial views Macro Files" .
Here's some of the code I'm using in the "old" Razor scripts:
@using umbraco.NodeFactory;
dynamic MyMagazine_node = Library.NodeById(1023);
There are more - for now, this a script that doesn't work - what's wrong? Thanks.
is working on a reply...