Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

How to hide the Media type field if no video is uploaded in paglayout

$
0
0

Hi,

I am creating a custom page layout with custom content type through visual studio 2010 for sharepoint 2010.

i need to create a field which supports to upload a video file.

so i created a site column and added it to my content type and added to my page layout.

<Field ID="{7F5AE2F9-C1A2-4BFD-876C-56ECFB7B0210}" Name="Video" DisplayName="Article Video" Type="MediaFieldType"  Group="Article Layout Columns" />

<FieldRef ID="{7F5AE2F9-C1A2-4BFD-876C-56ECFB7B0210}" Name="Video"/>

In my page layout i added the field in both edit and display mode as

   <PublishingWebControls:MediaFieldControl ID="MediaFieldControl1" FieldName="Article Video" runat="server"/>

All is well the video is displayed and i can add video.

My req is i need to show the video div in display mode only if video is added else it should be hidden in display mode.

how to do that?


Aruna


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>