Posts Tagged ‘EditModePanel’

Showing the Audience Target field in an EditModePanel #SharePoint #SP2010 #in #ProjectServer #PS2010

February 22, 2012 2 comments

I have been meaning to blog about this since the public beta of 2010 but never quite got round to it until now!

I was reminded of the functionality we implemented for a client recently that allowed the Audience Target field to appear in the Edit Mode Panel of a Publishing page layout.

You would think that it would be easier, but after lots of digging around we finally found a solution.

Firstly in the Page Layout we need to register a new reference at the top of the page:

<%@ Register
   Assembly="Microsoft.Office.Server.UserProfiles, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c"

With this new reference in place we can now implement the field in a standard EditModePanel way like so:

<PublishingWebControls:EditModePanel runat="server" PageDisplayMode="Edit">
               Use if you wish to ‘push’ this content to a particular
               audience select here. Leaving it blank will make it
               available to all site users.
            <br />

Have fun!

%d bloggers like this: