2
votes

I can't figure out why my template fields don't show anything in Sitecore.

My template content is as follows:

enter image description here

@Html.Sitecore().Field("Title"), @Html.Sitecore().Field("Sub-title") and @Html.Sitecore().Field("Description") give the correct values but when I try these new fields I just added: @Html.Sitecore().Field("Banner Image") or @Html.Sitecore().Field("Test") - they're just blank.

Any ideas?

1
Do they work in Experience Editor? Are you sure you've published new fields? - Marek Musielak
Did you publish your template? Does it look fine in Experience Editor - Vlad Iobagiu
Nope, that was it, thanks! Never used Sitecore before, my bad! - Jazcash
could you double check fieldname's with titles? Is "Banner Image" and "Test" are field names not titles of fields? - Dheeraj Palagiri
@Jazcash comment converted into answer. - Marek Musielak

1 Answers

4
votes

Sitecore template fields are items in Sitecore content tree. If you want to use them in the client facing site, you need to publish them as you publish all the other items.

Simplest way of checking if that's the problem is to open your page in Experience Editor and check if the fields work there.