Sharepoint variations:programmatically updating/creating draft pages in variation sites.

Hi,
Programmatically I am trying to update/create pages in variation sites.
The below are the two ways to propagate pages to variation site through OOTB.
1) Automatically propagating the published pages to variation sites when the “variations propagate page job definition” timer job runs.
2) User can manually click the update button under publishing tab in SharePoint ribbon for the draft version of a publishing page.
Programmatically how to update the draft pages (step2) so that the changes will be reflected in variation sites.
I tired the below, but not working.
Listitem.update();
Page.update();
File.update();
Thanks & Regards,
Sudheer
Thanks & Regards, Sudheer

Hi Naga,
Based on my understanding, for the page propagation, each time you publish a source page, the variations event receiver will add an item to the Variations Propagate Pages timer queue, when the timer
job runs, it will begin executing the first 100 page propagation work items, and when you click “Update Variations” button, it will also add a work item to the same timer job queue when “Automatic Creation” is enabled, you can refer to the following link for
more information:
http://blogs.msdn.com/b/ecm/archive/2010/06/22/variations-propagate-pages-on-your-terms.aspx
As for the page item, variations will copy the source page to all target sites, creating page if it does not exist, in this situation, you don’t need to update the item, the timer job will achieve
this with items not published.
If I have any misunderstanding, please feel free to let me know.
Thanks,
Qiao Wei
TechNet Community Support

Similar Messages

  • How to get the page layouts programmatically and create a page for that pagelayout

    how get the page layouts programmatically and create a page for that pagelayout and add webpart
    please help me with da code.Thanks
    adityadugyala

    Hi if your page layouts alreday created then create new page programaticaaly  and apply your page ayouts to that page by coding you can do something like following
    PublishingWeb publishingWeb =
    PublishingWeb.GetPublishingWeb(web);
    PageLayout[] layouts = publishingWeb.GetAvailablePageLayouts();
    PageLayout layout = layouts[0];
    string pageName =
    "MyPublishingPage5.aspx";
    PublishingPage newPage = publishingWeb.GetPublishingPages().Add(newFolder.Folder.ServerRelativeUrl +
    "/"+ pageName, layout); 
    newPageUrl = web.Url +"/" + newPage.Url;
    newPage.Description = "This my sample publishing page";
    newPage.Title = "My Publishing Page";
    newPage.Update();
    Please follow link
    http://blogs.msdn.com/b/sowmyancs/archive/2008/03/15/create-publishing-pages-in-portal-sites-programmatically.aspx
    Please mark answer , if you think answer is helpful or correct.

  • Creating Master page for publishing site

    Hi,
    I am trying to create a master page for publishing site. I have downloaded the "StarterBranding - V1.3" from codeplex, and used the "Starter Publishing". Currently it is not showing logo, search box, top navigation, breadcrumbs.
    I have an existing master page which has lot of tags, and I am not sure what they represent. The below code is after the script manager tag in the body section:
    <SharePoint:AjaxDelta id="DeltaDelegateControls" runat="server">
    <SharePoint:DelegateControl ID="DelegateControl2" runat="server" ControlId="GlobalNavigation" />
    <SharePoint:DelegateControl ID="DelegateControl3" ControlId="GlobalSiteLink3" Scope="Farm" runat="server" Visible="false" />
    </SharePoint:AjaxDelta>
    <div id="TurnOnAccessibility" style="display:none" class="s4-notdlg noindex">
    <a id="linkTurnOnAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(true);UpdateAccessibilityUI();document.getElementById('linkTurnOffAcc').focus();return false;">
    <SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" text="<%$Resources:wss,master_turnonaccessibility%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div id="TurnOffAccessibility" style="display:none" class="s4-notdlg noindex">
    <a id="linkTurnOffAcc" href="#" class="ms-accessible ms-acc-button" onclick="SetIsAccessibilityFeatureEnabled(false);UpdateAccessibilityUI();document.getElementById('linkTurnOnAcc').focus();return false;">
    <SharePoint:EncodedLiteral ID="EncodedLiteral2" runat="server" text="<%$Resources:wss,master_turnoffaccessibility%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div class="s4-notdlg s4-skipribbonshortcut noindex">
    <a id="A1" href="javascript:;" onclick="document.getElementById('startNavigation').focus();" class="ms-accessible ms-acc-button" accesskey="<%$Resources:wss,skipribbon_accesskey%>" runat="server">
    <SharePoint:EncodedLiteral ID="EncodedLiteral3" runat="server" text="<%$Resources:wss,skipRibbonCommandsLink%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div class="s4-notdlg noindex">
    <a id="A2" href="javascript:;" onclick="document.getElementById('mainContent').focus();" class="ms-accessible ms-acc-button" runat="server">
    <SharePoint:EncodedLiteral ID="EncodedLiteral4" runat="server" text="<%$Resources:wss,mainContentLink%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div id="TurnOffAnimation" style="display:none;" class="s4-notdlg noindex">
    <a id="linkTurnOffAnimation" href="#" class="ms-accessible ms-acc-button" onclick="ToggleAnimationStatus();return false;">
    <SharePoint:EncodedLiteral ID="EncodedLiteral5" runat="server" text="<%$Resources:wss,master_disableanimation%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <div id="TurnOnAnimation" style="display:none;" class="s4-notdlg noindex">
    <a id="linkTurnOnAnimation" href="#" class="ms-accessible ms-acc-button" onclick="ToggleAnimationStatus();return false;">
    <SharePoint:EncodedLiteral ID="EncodedLiteral6" runat="server" text="<%$Resources:wss,master_enableanimation%>" EncodeMethod="HtmlEncode"/></a>
    </div>
    <a id="HiddenAnchor" href="javascript:;" style="display:none;"></a>
    <div id="suiteBar" class="ms-dialogHidden noindex">
    <div id="suiteBarLeft">
    <div class="ms-table ms-fullWidth">
    <div class="ms-tableRow">
    <div class="ms-tableCell ms-verticalAlignMiddle">
    <SharePoint:DelegateControl id="ID_SuiteBarBrandingDelegate" ControlId="SuiteBarBrandingDelegate" runat="server"/>
    </div>
    <SharePoint:AjaxDelta runat="server" id="DeltaSuiteLinks" BlockElement="true" CssClass="ms-core-deltaSuiteLinks">
    <div id="suiteLinksBox">
    <SharePoint:DelegateControl id="ID_SuiteLinksDelegate" ControlId="SuiteLinksDelegate" runat="server" />
    </div>
    </SharePoint:AjaxDelta>
    </div>
    </div>
    </div>
    <div id="suiteBarRight">
    <SharePoint:AjaxDelta runat="server" id="DeltaSuiteBarRight" CssClass="ms-core-deltaSuiteBarRight" BlockElement="true">
    <div id="welcomeMenuBox">
    <wssuc:Welcome id="IdWelcome" runat="server" EnableViewState="false" />
    </div>
    Are the above tags required in Master page? what is the use of it? I have more tags and will add after knowing the use of it in future threads.
    Thanks

    Hi,
    According to your description, my understanding is that you want to know about the each tags useful in master page.
    In SharePoint 2013 master page, there are some common tags like body tag, head tag and meta tag and some style CSS div tags. For the useful of these tags, I suggest you can refer the articles below:
    Understanding HTML master pages in SharePoint 2013
    In your custom master page, it will have some custom css tags depend on the display style but it is no required for master pages, if you want to know about what tags is required in master page, you can compare the custom master page with the  OOTB master
    page.
    More information:
    Create a minimal master page in SharePoint 2013
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Part 10 - Creating Multiple Pages | Classroom: Basic Site Layout and Navigation in Dreamweaver | Adobe TV

    This lesson covers how to create multiple pages based on the page you have already created earlier.  You’ll then learn how to set up the navigation and how to change the content for each page including adding different background graphics by customizing certain CSS properties while still maintaining the shared CSS scheme across the site.
    http://adobe.ly/xLdpe4

    After this tutorial no 10 my background image didn't change for the rest 3 pages. It stayed the same even though I made a new css rule as shown. I picked tag, this document only, and body as a selector name. Changed the bckgrpund color to black, and than changed the picture as well. I clearly see the new "body" css rule that is above my Paolo css rule in the side bar, but no changes on the pages, I still got the same bckground image for all of them.
    Any ideas? Anybody with  a similar problem?

  • Use a Custom Page Layout When Creating [[new pages]] in Enterprise Wiki

    I have followed a few different blogs and I've been able to create a custom wiki content type and create a new page layout based off of that content type. I've also set my site so that my new layout is the default page layout. This works when creating
    new pages on the site but when i try to create a new wiki page --> [[new page]], I'm still getting the typical blank wiki template. How on earth do i get my page layout to sync with creating a new wiki page?

    Hi,
    For your issue, go to Site Actions > Site Settings > Page layouts and site templates (Under Look and Feel).
    Pages in this site can only use the following layouts: add custom wiki template.
    Select default page layout: choose custom wiki template.
    Besides, here is a blog, you can use as a reference:
    http://blog.henryong.com/2010/06/08/how-to-create-custom-sharepoint-2010-page-layouts-using-sharepoint-designer-2010/
    Best Regards,
    Lisa Chen

  • Unable to create a page which deleted from pages library

    hi,
    I want to create a page from my site collec's pages library. i have already created the page say one.aspx and i have deleted the same. and  again    i am trying to create the same page one.aspx. but i am getting 
    serevr error  in appln.

    Paul,
    thanks for your  reply.
    i have confirmed from the recycle bin also. 
    even i hav tested it with a console appln also : here is the code :
    namespace TestingConsoleApplication1
    public class myProgram
    public static void Main(string[] args)
    myProgram objmyprog = new myProgram();
    objmyprog.deleteonepage();
    public void deleteonepage()
    PublishingWeb publishingWeb = null;
    using (SPSite oosite = new SPSite("http://srvr1/sites/OPTC"))
    using (SPWeb ooweb = oosite.OpenWeb())
    if (PublishingWeb.IsPublishingWeb(ooweb))
    publishingWeb = PublishingWeb.GetPublishingWeb(ooweb);
    // get the pages collection
    PublishingPageCollection pages = publishingWeb.GetPublishingPages();
    if (pages[publishingWeb.Url + "/Pages/EditMetadataPage.aspx"] != null)
    // page exists so delete it
    PublishingPage page = pages[publishingWeb.Url + "/Pages/EditMetadataPage.aspx"];
    page.ListItem.Delete();
    can you pls help.
    scrn shot is attached.

  • Unable to update SharePoint List Programmatically in SharePoint Online - Anonymous Login

    We are unable to programmatically update SharePoint lists with Anonymous access in Office 365 - SharePoint Online site. That is, in a public facing SharePoint Online Site, we have a Contact Us Page and when submitted, we would like to store that item in
    a List and then also a trigger an e-mail notification? We are unable to do that using SPServices or CSOM because the code is not firing as the user is logged in anonymously. How do we do this?
    Karthick S

    Naveen,
    I tried this solution and I am getting correlation error .Can you please check this?
    Error is:
    "Web Part Error: Solution failed validation. Correlation ID: e225e49c-c008-1000-ae6e-eeb998cf42af."

  • How do i create a drop-down menu in SharePoint that redirects to a new page?..

    Helly everyone, i have a question and really hope someone can help me out here:)
    In SharePoint i want to create a drop-down menu that has the possibelty to redirect to other websites.
    I fount the code below and it works but just not in SharePoint:(
    It only shows the drop-down list but it doesn't redirect you to another website if you click on a site.
    Can someone please help me out because it's really getting frustrating.
    <form method="post" action="" name="">
    <select name="select15" onChange="window.open(this.options[this.selectedIndex].value,'_parent')">
    <option selected>Please Select Site to Visit</option>
    <option>---------------------------------------------------</option>
    <option value="http://leedssocialclubs.co.uk">Leeds Social Clubs </option>
    <option value="http://yahoo.co.uk">Yahoo </option>
    <option value="http://msn.com">MSN </option>
    <option value="http://Moonfruit.com">Moonfruit </option>
    <option value="http://burystaffhire.moonfruit.com/#/home/4548482603">Bury Staff Hire</option>
    </select>
    </form>

    <form>
    <select name="URL" onchange="window.location.href=this.form.URL.options[this.form.URL.selectedIndex].value">
    <option value="">Choose a site</option>
    <option value="http://webdesign.about.com/">Web Design Front Page</option>
    <option value="http://webdesign.about.com/library/beginning/bl_begin.htm">
    Beginning HTML</option>
    <option value="http://webdesign.about.com/od/javascript/">JavaScript Help</option>
    </select>
    </form>
    Demo url
    http://webdesign.about.com/od/examples/l/blfaqddredirect.htm
    script url
    http://webdesign.about.com/od/javascript/a/aa050701a.htm
    For me it is working fine

  • How to Create Custom List in SharePoint 2010 Programmatically ?

    Hi,
    i have tried the following way, 
    http://devendra-sharepoint.blogspot.in/2012/01/creating-list-programatically-in_30.html
    But i am not able to create list.
    Becuase i am getting the following error.
    'Microsoft.SharePoint.SPWeb' does not contain a definition for 'EnsureList' and no extension method 'EnsureList' accepting a first argument of type 'Microsoft.SharePoint.SPWeb' could be found (are you missing a using directive or an assembly reference?)
    Please advice.
    Thanks,
    Aasai

    Hi,
    You can use list.Fields.Add() to add column in list. See below blog:
    http://www.c-sharpcorner.com/blogs/3764/create-sharepoint-list-programmatically.aspx
    Use this to delete list:
    http://www.c-sharpcorner.com/UploadFile/54db21/delete-list-in-sharepoint-2010-programmatically-using-vs-201/
    See this for remove user/group from list:
    http://www.c-sharpcorner.com/UploadFile/54db21/remove-group-permission-to-list-in-sharepoint-2010-programma/
    Hope it could help
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • Programmatically creating a page with portlets in it

    Hello!
    I need a little help figuring out how to programmatically create a page and add a couple portlets to it. I have figured out how to create the PageDefinition and that code works great. How can I add 2 portlets (the portlet definitions already exist in the Portal Library) to that page definition?
    I just need a couple hints & maybe some pseudo-code to get me going in the right direction.
    I'm stuck with using BEA 8.1 SP2 at the moment.
    Thanks for any help,
    John

    If you want to add the portlets to the page in the library and effect all instances of the page use the PageDefinitionManager.addPlaceable(...) EJB.
    javadoc
    http://edocs.beasys.com/wlp/docs81/javadoc/com/bea/netuix/application/manager/IPageDefinitionManager.html#addPlaceable(com.bea.netuix.application.manager.CustomizationContext,%20com.bea.netuix.application.identifier.PageDefinitionId,%20com.bea.netuix.application.identifier.PlaceableDefinitionId,%20com.bea.netuix.application.identifier.PlaceholderDefinitionId,%20int)
    If you want to just effect that page on a particulr desktop use the PortalCustomizationManager.addPlaceable(...) EJB
    http://edocs.beasys.com/wlp/docs81/javadoc/com/bea/netuix/application/manager/IPageInstanceManager.html#addPlaceable(com.bea.netuix.application.manager.CustomizationContext,%20com.bea.netuix.application.identifier.DesktopDefinitionId,%20com.bea.netuix.application.identifier.PageInstanceId,%20com.bea.netuix.application.identifier.PlaceableDefinitionId,%20com.bea.netuix.application.identifier.PlaceholderDefinitionId,%20int)
    Chris Jolley
    Portal Architect

  • Create a page programmatically

    This might be a silly question.
    Looking at the JSF 1.1_01 API, I don't see methods supporting creating pages programmatically. For example, I would expect the UIForm class to have something like an addChild method.
    Does this mean JSF does not intend to support creating a page programatically?

    The trick is
    UIComponent.getChildren().add(UIComponent)That does seem like a solution or more accurately workaround. Look at the notes for the List returned by UIComponent.getChildren() such as
    # Any attempt to add an object that does not implement UIComponent must throw a ClassCastException.
    # Whenever a new child component is added, the parent property of the child must be set to this component instance. If the parent property of the child was already non-null, the child must first be removed from its previous parent (where it may have been either a child or a facet).
    Wouldn't it be much nicer if an addChild method is provided (say in UIComponentBase class) to do all this?
    Anyway, thanks for the quick response.

  • Unable to create a page content type

    Add-PSSnapin -Name Microsoft.Sharepoint.Powershell
    #$SiteURL = get-SPSite "http://srvr1:123/sites/ENGG/"
    $w = get-spweb "http://sRVR1:123/sites/ENGG/"
    $web = get-spweb "http://sRVR1:123/sites/ENGG/"
    try
    $cts =  $w.ContentTypes
    Write-Host "inside content types try block"
    $spId = new-object Microsoft.SharePoint.SPContentTypeId("0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007948130EC3DB064584E219954237AF3900DCED8380ADA44ABB8411D56976A5F491")
    $spId
    $ct = new-object Microsoft.SharePoint.SPContentType($spId,$cts,"BIFPageCT")
    catch
      Write-Host "error occured in creation"
    Write-Host "going2 update web"
    $w.Update();
    #get all the ctypes from site collec
    ForEach($ctype in $w.ContentTypes)
    { #write-host $ctype.Name": "$ctype.ID
     if($ctype.Name -eq "BIFPageCT")
    {   write-host $ctype.Name": "$ctype.ID }else {  Write-Host "ctype not found" }}
     I  tried to create a  new content type in my new site collec in my portal. but it failed to  create.i have taken the content type id from my another site collc. where this content type is  successfully created!
    please help why i am getting content type not found error.

    Hi,
    We can use the following PowerShell script to create a page content type.
    $spWeb = Get-SPWeb http://sRVR1:123/sites/ENGG/
    $spWeb.AvailableContentTypes | Select Name
    $parent = $spWeb.AvailableContentTypes["Page"]
    $contentType = New-Object Microsoft.SharePoint.SPContentType -ArgumentList @($parent, $spWeb.ContentTypes, "BIFPageCT")
    $contentType.Group = "My Content Type"
    $contentType.Description = "BIF Page Content Type"
    $spWeb.ContentTypes.Add($contentType)
    $spWeb.Update()
    $spWeb.Dispose()
    Here is a blog for your reference:
    http://www.microsofttechnology.net/2012/03/how-to-create-content-type-site-column.html
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • SharePoint WSP deployment not updating List GUID to match target site?

    We have done a "Save as Template" SharePoint site collection with a site and a sub-site saved as two WSP template files, including content. These deploy fine to our Staging server when we put them into a path-based site collection.
    However, we are expected to use a host-named site collection.  Deploying to that, when accessing a page gives “list not found” error on the top site and “Invalid Page Layout” error on the subsite.
    Using ULS I can see that on the top site SharePoint is trying to access the Pages List using the GUID from our development server. The GUID for the actual Pages Library is different on the Staging server, as the Pages Library was created when the Publishing
    Feature was activated. I don’t see any easy way to update the baked-in list GUID which normally SharePoint would update as part of the deployment. Especially as it is a system library.
    In this
    thread I did find that this was a known issue up until the November 2014 CU, however, having upgraded the server to the December 2014 CU we still have the problem.
    I have also noticed that for our Page Layouts on the subsite SharePoint has not updated the URLs (they still point at out Dev Server), resulting in "Invalid page Layout" errors.
    Any suggestions for how to tell SharePoint the correct GUID to use for our Pages Library would be appreciated.

    The only solution to this was to change the dev server to use Host Named Site Collections. We exported the (path based) Site Collection and then reimported it using the Backup-SPSite/Restore-SPSite powershell from here:
    https://technet.microsoft.com/en-us/library/cc424952.aspx?f=255&MSPPError=-2147217396
    We were then able to produce WSPs which the Staging server could understand - the lists updated correctly when deployed if the origin was a host-named dev site.

  • .pages file created in Pages for Mac won't open in Pages for iPad

    Just created a pages document on my Mac, saved it to my google drive and when attempting to "open in" from my google drive the file won't open in pages for iPhone or iPad (mini).
    All versions of Pages are on latest release.
    Messge reads:
    Document can't be imported.
    The file format is invalid.
    I download both the mac app and ios app a week ago.
    Thank you for any info!

    I've been testing file structures via google drive this morning and have yet to find a solution.
    Compressed files will not open in Pages on the ipad and an upload to Google Drive of a .pages document re downloaded to my desktop will no longer open in Pages on the Mac.
    Somewhere in the google ecosystem during upload or download / "open in" (on the ipad) the file is being restructured so that it cannot be recognized.
    An hour call with the team at Google hasn't supplied an answer yet and they have opened a case file to investigate.
    I'll update when I hear back.
    Thanks!

  • Can multiple users edit a draft page

    I have a client that is considering using Contribute to
    update their web site, but they need the capablility for multiple
    authors to edit the content of a page and then submit it for review
    before it is published. Can this be done with Contribute by using a
    draft page which can be edited by several users and then reviewed
    by the website administrator before it is published live?
    Thanks,
    Richard

    How were you planning to submit/process the form data? Most methods would be fine because they do not touch the original, which can have unlimited read-only copies.

Maybe you are looking for

  • My en-dashes in Pages turn into thin em-dashes.

    My en-dashes in Pages turn into thin em-dashes.  After conversion to ePub and displayed on my iPad. Any ideas?

  • Firefox is eating up memory, running at about 650Mb

    Anybody got any ideas about how to stop this? its making the use of mission control and other apps very slow.

  • Mulitple monitor graphics glitch

    I'm experiencing a graphics glitch on my 2nd monitor which I'm using firefox 4 in. My dropdown live bookmarks are whiting out when my mouse pointer floats over them and becomes visible when they're not. only on the 2nd monitor. Also for radio / check

  • Multiple Plants for Material and customer

    Hi, I have downloaded the Plants from the R/3 to CRM using DNL_PLANT object. The BP with Role 'PLANT' are created. we  have multiples plants for the same material, I have downloaded the material master data, but in COMMPR01, the field DELIVERING LOC.

  • Horizontal Menu

    Hi everyone I have a page where i have a horziontal menu... I have been using showonetab and for each menu I have add a showDetailItem. For each menu I drag the object that i want to create into the showDetailItem... When I run the page, everything i