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.

Similar Messages

  • How to cancle the previous apple ID and creat another one for the same ipad mini

    Please advise how to cancle the previous apple ID and creat another one for the same ipad mini.
    Thank you.

    You can log out of an account (you can't 'cancel' an account) by tapping on it in Settings > iTunes & App Store - any content that you downloaded with that account will remain tied to that account. You can then create a new account via the Create New Apple ID button on that screen. If you don't want to give credit card details then follow the instructions on this page when creating the new account : http://support.apple.com/kb/HT2534

  • I have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending

    i have a problem with mail.  the spelling and grammer check box before sending the messege is no longer there.  I did everything but cannot get it back.  is ther anyone who knows how to get the box with spelling and grammer checks before sending the mail.
    Also the mail is acting very funny by not getting the rules work in a proper method.  Is ther a software to repair mail.

    i did both of them, but still the while sending the mail the diolog box is not showing up and also the spelling and grammer does not do the spelling check. 
    This problem just started for about 3 to 4 days now.  earlier it was working normally.

  • How to get the all process orders and outbound deliveries based on material

    Hi Team ,
    I need one help from you regarding the MB 56 transaction.
    My doubt is : How to get the all process orders and outbound deliveries based on material, plant and batch?
    Please help me regarding this.
    Thanks & Regards,
    Srikanth.

    Hi,
    You can use ST05,to trace the program and find out,
    hope it will help you...
    thanks and regards,
    veera.

  • How to get the health , performance information and about the services run on devices that have connected to the system center?

    Hi All,
    I want to know how to get the health , performance information and about the services run on devices that have connected to the system center to my c# application. Also I need to know about the information of databases that have connected to system center.
    I will appreciate your feedback
    Thank you

    Hi,
    You can configure service monitor for the required service on the server
    refer below link for how to configure service monitoring
    http://www.bictt.com/blogs/bictt.php/2011/03/17/scom-monitoring-a-service-part3
    You can use SCOM SDK to connect to the scom server using c# and get required information
    http://msdn.microsoft.com/en-us/library/hh329086.aspx
    you can find the database in below registry path on management server
    HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Setup\DatabaseName
    Regards
    sridhar v

  • How to get the NT user id and passwd

    Hi,
    How to get the NT user id and passwd using form 6i

    You cannot get the password. Password are stored in an encrypted format. Almost never decrypted (as a security meassure). Authentication is performed by encrypting the supplied password and matching that against the stored encrypted password.
    Think about it.. just how dangerous it will be to have a function that can dump NT users and their passwords for you. How can you ever expect to "simply decrypt a password"?
    As for getting the user name. See the Win32 kernel API call GetCurrentUser(). Also note that there is a big difference as to the owner/user of a server process/thread versus the end-user of client application (possibly running on another PC) that is making the call to the server.
    Of course, none of this is related to SQL or PL/SQL - which is what I believe the subject matter of this forum is... Kindly suggest that in future you pay attention to posting the correct subject material to the correct forum.

  • How to get the activity instance id and process id

    Dear All,
    For my case, my boss require the workflow program processor can be runtime assigned . After research, I found the coding example like below:
    // dynamically assign a user to a role
    rtm.addRuntimeDefinedUserToRole(
                      // process instance
                      prInstance,
                      // role name
                      "Processor",
                      // user that is assigned (IUser)
                      user,
                      // user context (IGPUserContext)
                      userContext);
    // dynamically change the user assigned to a role for a particular task
    String prInstanceID = prInstance.getID();
    rtm.changeTaskProcessor(
                      // process instance ID
                      prInstanceID,
                      // activity instance ID
                      activityInstanceID,
                      // current user (IGPUserContext)
                      currentProcessorContext,
                      // new user (IGPUserContext)
                      newProcessorContext);
    But I don't know how to get the process instance ID and activity instance ID before I can apply this api in my webdynpro application.
    Any gentllement can give me an idea.
    Thank you.
    Regards
    Eric

    process =  GPProcessFactory.getDesigntimeManager().getActiveTemplate(
                                  // by specifying its ID "CCD2C3F1BED111DD9DFA005056A9416C",/
                                                 /* and the user accessing it */ userContext);
         //          retrieve the Runtime Manager
         IGPRuntimeManager rtm = GPProcessFactory.getRuntimeManager();
         // create an empty role assignment list
         IGPProcessRoleInstanceList roles = rtm.createProcessRoleInstanceList();
         //Initialising the input params
         IGPStructure params =GPStructureFactory.getStructure(process.getInputParameters());
         params.setAttributeValue("Name",value);
         //Starting the process
         IGPProcessInstance prInstance = rtm.startProcess(process,"Process Name","Process name",user,roles,params,user);

  • I bought two films on my ipod tough 4g ( normally comes up on my ipad if i have bought something on my ipod) but i dont know how to get the two films on my ipad without paying for them.

    I bought two films on my ipod tough 4g ( normally comes up on my ipad if i have bought something on my ipod) but i dont know how to get the two films on my ipad without paying for them.

    Movies work differant than TV shows, music and apps. With movies, to get them from one device such as an iPod Touch to an iPad, you would need to connect the Touch to your computer first and in iTunes under the file menu, hit transfer purchases. Next connect the iPad and you can sync the movie to the iPad.
    While the iPad is connected to the computer, in iTunes, click on the iPad in the left pane and when the screen loads, click movies and from there, you can select the movie that you want to sync.

  • How to get the object class field value in CDHDR table for vendor

    hi
    how to get the object class field value in CDHDR table for vendor

    Try KRED/KRED_N as object class in CDHDR for Vendor.

  • HT2931 I am trying to figure out how to get the pre made "beats" with my garage band for my MacBook Air can u help

    I am trying to figure out how to get the pre made "beats" with my garage band for my MacBook Air can u help

    Hello Mattxy2,
    Thank you for the question. It sounds like you would like to add some Apple Loops to your project.  I recommend reviewing the following sections in Garageband Help:
    GarageBand Help - Search for Apple Loops
    http://help.apple.com/garageband/mac/10.0/#gbnd3002ab64
    GarageBand Help - Add Apple Loops to your projects
    http://help.apple.com/garageband/mac/10.0/#gbndc1d3db81
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • How to get the document type, name and revision from the search page cv04n

    Hello,
    After performing cv04n and getting a list of documents satisfying the search criteria, how can I then get the document type, name and revision of the selected document using ABAP?
    Thanks

    HI,
    IN table DRAW... u have Document type, Version and document number.
    In Table DRAT also u get Document Type, Version, Number and Description of Doucment.
    Regards
    SAB

  • How to get the Dynamic UI component value from JSFF page to any managedbean

    HI ,
    We have list of bean objects in jSF page we are iterating the list of bean using the forEach loop and displaying the value into Input type text (UI component) value filed .
    If we try to get the UI component value in Managed bean we are not getting the dynamic values .
    The below piece of code used to retrieve the dynamic values from the JSF page doesn't have any form :
    UIComponent component = null;
    FacesContext facesContext = FacesContext.getCurrentInstance();
    if (facesContext != null) {
    UIComponent root = facesContext.getViewRoot();
    component = findComponent(root, componentId);
    then component type casting to the based on UI component which we trying to access and getting the value as " NULL " ..Please let me know how to get the dynamic values form the JSF ?
    Please let me know if any other approach or any changes required on above ?
    Thanks

    Hi,
    the root problem is this
    <h:inputText id="it3" value="#{familyList.ctn}" />
    <tr:commandButton text="Save" id="cb3"Note how each row writes to the same managed bean property, thus showing the same data. Instead your managed bean should expose a HashMap property that you then apply values to using a key/value pair. The key could be the ID of the field, which then you also should dynamically define e.g. cb<rowIndx>. The command button could then have a f:attribute assigned that has the row HahMap key as a value. This way you truly create value instances for the object
    Frank

  • How to get the SAVE Layout  ICON on ALV Grid display report

    Hi,
      I am using the standard ALV Layout, and I do not get the SAVE LAYOUT Icon on the Menubar, where I could save the report Layout.I am using the layout routine as,
    FORM layout_build USING   u_lf_layout TYPE slis_layout_alv.
      u_lf_layout-box_fieldname       = 'SELK'.  " Checkbox
      u_lf_layout-zebra               =  'X'.
      u_lf_layout-colwidth_optimize   =  'X'.
      u_lf_layout-confirmation_prompt =  'X'.
      u_lf_layout-get_selinfos        =  'X'.
      u_lf_layout-f2code              =  '&ETA' .
      u_lf_layout-detail_titlebar     =  'Delivery Due List'.
      u_lf_layout-key_hotspot         =  'X'.
      u_lf_layout-info_fieldname      =  'COL'.
    ENDFORM.                    " layout_build
    Is there anything that I am missing. Please suggest.Many thanks for your help.
    Regards,
    Mira

    Hi,
    i think you've forgotten param. <b>i_save</b>
      x_save = 'X'.
      gs_variant-report     = sy-repid.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                I_STRUCTURE_NAME = 'ZTAB01'
                IS_VARIANT       = gs_variant
                IS_layout        = lay
                I_SAVE           = x_save
           TABLES
                T_OUTTAB         = gridtab
           EXCEPTIONS
                OTHERS           = 1.
    regards Andreas

  • How to get the set pf-status and call Transaction work together in SA

    hi,
    I am using Set pf-status to display the details screen and the same time using call transaction va03 leave screen 0 to display the corresponing sales order.
    The issue is both of them are not workin together properly.
    it could be helpfull if you give some code which deals the issue in detail...
    can you please give details how to get the previous screen once the new screen is obtained thru set pf-status
    thanks and regards
    Edited by: san dep on Jul 10, 2008 6:25 PM

    Hi,
    Try this code ---
    SET PF-STATUS 'STATUS_NAME' OF PROGRAM 'ZPROGRAM_NAME'.
    Regards
    Pinaki

  • How to get the WSDL services up and running

    Hi,
    I have created a real-time process. I am going to 'Web Services Tester' and getting my project. I am able to see the screen. When I enter data and click on 'Send' I get the message 'The services are not up and running.'
    According to the Student activity guide I need to do the following:
    "If the Web services Tester does not appear on the Launch Pad, click 'Server Configuration' , input your Username and pwd, and then click 'Applications. Select  the checkbox to the left of the Web Services Tester. Click Save and then click Home."
    I do not see the icon 'Server Configuration' on my launch Pad. Let me know how it can be enabled so that it appears on the Launchpad.
    Let me know how to get the web services running.
    Thanks
    Prabha

    Once you have a process which reads from and writes to the web service, just run the process, either directly or in a job.
    Richard

Maybe you are looking for

  • After 10.4.9 Update I have duplicate mailboxes! Deleted one and lost mail!

    Hello, Mail is giving me problems after the 10.4.9 update. I have duplicate mailboxes for each of my four accounts. After deleting the duplicate, I have lost all mail in that mailbox. It seems that although the mailboxes appear to be duplicates, they

  • Txt file to XML using File Adapter

    Dear  ALL, I am doing file to file scenario, where i have to convert txt file from sender to xml as receiver . I have done with all the conversion content parameters at the sender file adapter as below: DocumentName: DocumentNamespace: RecordsetName:

  • TS3276 Sent emails are missing....

    All emails have been deleted from my "sent" items folder. I use Outlook on an Apple MacBook Pro and have not changed the settings/preferences or anything else recently and have not deleted any mail items in the past 2 months....help!

  • How Release Strategy is picked up

    Hi, There are many release strategies configured in the system for various company code/P Grp/Plants combination.However for newly introduced territory and the respective company code/plants combination,the configuration has not yet been carried out.

  • Safari quits while Mac Mini is asleep

    I am running Mountain Lion.   Since downloading Mt. Lion, periodically Safari quits while my Mac Mini is asleep.   ????    This has happened about 6 times now.   Started a couple weeks after loading Mt. Lion.   Not happening on my other two laptops,