in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Niklas Östh's Sharepoint Blog

SharePoint tips and tricks from Sweden.

September 2007 - Posts

  • Using the Audience-field on a pagelayout

    If you want to use a audience field on a pagelayout you can use the example below in your aspx. 

    ...
    <%@ Register tagprefix="FieldTypes" namespace="Microsoft.Office.Server.WebControls.FieldTypes" assembly="Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    ...
    <asp:Content contentplaceholderid="PlaceHolderMain" runat="server">
    ...
        <PublishingWebControls:editmodepanel runat="server" id="editmodepanel">
    ...
                        <FieldTypes:SPFieldTargetToControl runat="server" FieldName="Audience" AudienceTypes="GlobalAudience" />
    ...
        </PublishingWebControls:editmodepanel>
    ...
    </asp:content>

  • Using scheduling of pages but not the authoring workflow

    In various onet.xml you often see the two publishing features with the following property SimplePublishing set to true.

    The advantage with this is that you don't have to go through the Approval workflow for every page that is going to be published. The disadvantage is that you lose the ability to schedule pages for later publishing and how long they should be published.

    The solution to get the best of both worlds (scheduling but no approval workflow) is to change the site definition to this instead:
    <SiteFeatures>
            ...
            <Feature ID="AEBC918D-B20F-4A11-A1DB-9ED84D79C87E">
              <!-- PublishingResources -->
              <Properties xmlns="http://schemas.microsoft.com/sharepoint/">
                <Property Key="AllowRss" Value="false"/>
                <Property Key="SimplePublishing" Value="false" />
              </Properties>
            </Feature>
            ....
    </SiteFeatures>
    <WebFeatures>
            <Feature ID="22A9EF51-737B-4FF2-9346-694633FE4416">
              <Properties xmlns="http://schemas.microsoft.com/sharepoint/">
                ...
                <Property Key="SimplePublishing" Value="false" />
                <Property Key="EnableApprovalWorkflowOnPages" value="false" />
              </Properties>
            </Feature>
            ...
    </WebFeatures>

    Have fun,
    Niklas


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts