It's easier if you post the errors you encounter ;-) If using a tool like Visual Studio it would immediately say @helper is not recognized as it no longer exists in v9.
But you can do the following, change @helper to void and put it 'within code' and don't explicitly print it. Also 'page' is prohibited in a UmbracoViewPage (has a different meaning). If you do the following I reckon it should work:
To add to the explanation above, @helperis not part of .NET Core. This particular change is less about Umbraco and more about the underlying framework it's built on.
I run some quick tests and do this in just the online environment (cloud). And it's not giving me any errors in return. Maybe it's better indeed to do this in Visual Studio.
Allthough your adjustments doesn't seem to work either for me. So went with the option Dennis came up with.
Creating a sub navigation list
As mentioned in another topic, we are trying some existing code (V8) to copy into V9. Some of it doesn't work.
Such like the subnavigation.
What we had:
And this is what i've found so far and tried:
https://our.umbraco.com/forum/using-umbraco-and-getting-started/108001-recursive-menus#comment-335701
Maybe i'm doing something wrong. If it works with some adjustments at the old situation it's also good (Maybe better for us)
It's easier if you post the errors you encounter ;-) If using a tool like Visual Studio it would immediately say @helper is not recognized as it no longer exists in v9.
But you can do the following, change @helper to void and put it 'within code' and don't explicitly print it. Also 'page' is prohibited in a UmbracoViewPage (has a different meaning). If you do the following I reckon it should work:
Only things I did is changing the helper to a normal method, and renaming 'page' to 'item'
To add to the explanation above, @helper is not part of .NET Core. This particular change is less about Umbraco and more about the underlying framework it's built on.
Thank you for your answer.
I run some quick tests and do this in just the online environment (cloud). And it's not giving me any errors in return. Maybe it's better indeed to do this in Visual Studio.
Allthough your adjustments doesn't seem to work either for me. So went with the option Dennis came up with.
Hi Peter,
If you go to the backoffice and then settings --> partial views
When you are there then you create a new partial
Take the option from the snippet
Chose the one called List Descendants From Current Page
Then you can get an idea on how you can create the help method in v9
Hope this helps you further
/Dennis
Thank you again Dennis.
I didn't knew this before (I'm a Umbraco noob). I'll keep this in mind for the furure.
And again, it did the trick for me.
Hi Peter
Great to hear it did the trick for you.
Have a fantastic day
/Dennis
is working on a reply...