Skip to main content
edited tags
Link
Richard Seal
  • 20.8k
  • 5
  • 44
  • 79
edited tags
Link
Mark Cassidy
  • 25.4k
  • 7
  • 59
  • 117

Using Sitecore API Question().Field() helper

Source Link
Tony
  • 569
  • 7
  • 19

Sitecore API Question

I have a page in sitecore called SingleField.cshtml. It only has a 1 field from the content item that it's associated to.

@Html.Sitecore().Field("Title")

What I am searching for is how to dynamically tie a MVC page to a content item. Is there a way to do this? One thought is to pass in a content item id to the MVC page. Is there any API call like the following?

@Html.Sitecore().SetContentItem("f358f263-ee1b-4c40-a444-540d3fb636d9") @Html.Sitecore().Field("Title")