SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a page layout with a field defined like so:

<PublishingWebControls:RichImageField FieldName="30809220-9D7B-4124-8672-4DBBCEA8C67D" runat="server"></PublishingWebControls:RichImageField>

Everything is working fine with it. My question is, how can I only render the field if it has a image/value assigned to it?

share|improve this question
up vote -1 down vote accepted

Can you please be more specific about the problem? Correct me if I'm wrong, if you render the field only if it has some image/value assigned to it then how are you going to set a value in it for the first time? I dont see the 'Value' attribute set in your example.

There's one common problem with this field rendering when you dont have any image in it. You may find solution for that here

share|improve this answer
Your link described my problem exactly. The javascript approach to removing the wrapping elements was what I was considering but hoped there was a "cleaner" server-side approach. – joshb Aug 18 '12 at 15:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.