This project has moved and is read-only. For the latest updates, please go here.

Razor Objects

Jun 26, 2016 at 7:06 PM
Hello,

First off - I'm very new to OpenContent and I'm loving it! Thank you for this!

Is there a quick list of some of the razor objects available in a template? I'm looking for things like the edit url, whether the user can edit the current thing, etc. I've seen examples of those in the handlebars templates, but I'm not sure how to use them in Razor.

Thanks,

Mike
Oct 7, 2016 at 11:14 AM
Edited Oct 7, 2016 at 11:15 AM
Hi,

In razor all variables are accessible thru
@Model.MyVariable
or
@Model.Context.EditUrl
In Razor you can use @ObjectInfo.Print(Model) to show all available variables.

Regards,
Sacha