Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Do I really have to create two page layouts - one with and one with

  Asked By: Grace Lewis         Date: Mar 14, 2006      Category: Sharepoint      Views: 172
 

In Sharepoint Designer, is there a way to accomplish conditional
formatting in the html if there are images on the page versus when
there are not? For instance, if there are images on the page, I
want the following to occur:

<div class="photo">
<CMS:RichImageField FieldName="RI_Photo1" runat="server"
ID="RI_Photo1"></CMS:RichImageField>
</div>

If there are no images on the page, I don't want that "div
class=photo" tag to render--as, it puts this empty gray box on the
page.

I had a little bit of luck with javascript, but, I couldn't figure
out how to check if RI_Photo1 contained any data (specifically, an
image).

Any ideas?


Do you know someone who can help? Share a link to this thread on twitter, or facebook.

Tagged:                      

 

No Answers Found. Be the First, To Post Answer.

 


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].