Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

1 Answer 1

up vote 0 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

 
discard

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.