Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi guys, how do I get intelligense to work when editing my .cshtml file?
Code example:
@{ var selection = CurrentPage.Site().Children.Where("Visible"); } @foreach (var item in selection) { item.NoIntelligense }
Using CurrentPage returns content dynamically, which will not let you use Intellisense.
You can use Model.Content, which is strongly typed, to use Intellisense. More info and examples found here:
https://our.umbraco.org/documentation/Reference/Templating/Mvc/querying
Why strongly typed is the way to go:
https://our.umbraco.org/documentation/Reference/Common-Pitfalls/#dynamics
Thank you for your reply Matt and for the documentation link, you rock!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Intelligense in VS Pro 2015 (cshtml file)
Hi guys, how do I get intelligense to work when editing my .cshtml file?
Code example:
Using CurrentPage returns content dynamically, which will not let you use Intellisense.
You can use Model.Content, which is strongly typed, to use Intellisense. More info and examples found here:
https://our.umbraco.org/documentation/Reference/Templating/Mvc/querying
Why strongly typed is the way to go:
https://our.umbraco.org/documentation/Reference/Common-Pitfalls/#dynamics
Thank you for your reply Matt and for the documentation link, you rock!
is working on a reply...