Thursday, February 28, 2013

Create a dataview in sharepoint with datasource webservice

To create DataView in SharePoint Desgner based on SOAP Web Service do the following Steps:
  1. From Navigation Pane, click Data Sources.  From Ribbon, click the SOAP Service Connection Menu Item. DataSource Dialog Properties will appear:
    1. Service Description Location: This is the URL to the service description (WSDL) file.
      ex: http://[SharePoint Site URL]/_vti_bin/lists.asmx?wsdl
      Click Connect Now so SharePoint Designer can retrieve the description file. 
    2. Data Command: Like a REST service connection, this box identifies the command  that your data source is going to be configured to run. You need to support multiple datasource if you will use multiple command.
    3. Port: If the web service supports multiple interfaces, they will be listed here. The
      default port will be selected.
    4. Operation: When the Connect Now button is clicked, the wizard retrieves the WSDL
      file, which defines all of the operations that can be performed on the web service.
    5. Parameters: As mentioned previously, if the operation selected in the previous step
      requires parameters, those will be listed.
      If you tried to modify any parameter to set its value you will find check-box you must checked it if you want to your parameter dynamic read from (Control, QueryString, Cookie, Post Data,...)
  2. The wizard has two other tabs that are the same as the other data sources. 
    1. The Login tab can be used to set default login credentials.
    2. The General tab is used to provide a description of the data source configuration. 
  3. Create a new web part page, call it TestSOAP.aspx, and open it in Edit mode. . 
  4. Click in the web part zone, and then from the Ribbon, click Data View and add your data source.
  5. Drag your needed columns from the datasource and apply your adjustment and formatting of data view.
  6. When you finish you can export DataView by the following steps:
    1. click into the Web Part ribbon tab under List View Tools
    2. You have two options, To Site Gallery, and To File. 
Tips and Tricks:
  1. If you set parameter in your web service to read from connected webpart you find ParameterBindings appeared as below (check text in red). You can add more parameters with same way:

  2. <DataSources>
       <SharePoint:SoapDataSource runat="server" id="SoapDataSource1" AuthType="Basic"  
      WsdlPath="http://ServerUrl/_vti_bin/lists.asmx?WSDL"
      SelectUrl="http:// ServerUrl/_vti_bin/lists.asmx"
      SelectAction="http://schemas.microsoft.com/ sharepoint/soap/GetList"
      SelectPort="ListsSoap"
      SelectServiceName="Lists"
      AuthUserName="yellowdc\spadmin"
      AuthPassword="P@ssw0rd"><
      SelectCommand>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
       <GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/">
        <listName>{listName}</listName>
      </GetList>

    </soap:Body></soap:Envelope>
      </SelectCommand>
        <SelectParameters><WebPartPages:DataFormParameter Name="listName"    
              ParameterKey="listName" PropertyName="ParameterValues"        
              DefaultValue="{43AFBEAA-674C-406B-9ACB-0870CD4B88F2}"/>
        </SelectParameters>
      </SharePoint:SoapDataSource>
    </DataSources>


    <parameterbindings>
      <ParameterBinding Name="listName" Location="None"  
                                        DefaultValue="{43AFBEAA-674C-406B-9ACB-0870CD4B88F2}"/>
      <ParameterBinding Name="dvt_apos" Location="Postback;Connection"/>
      <ParameterBinding Name="ManualRefresh" Location="WPProperty[ManualRefresh]"/>
      <ParameterBinding Name="UserID" Location="CAMLVariable" DefaultValue="CurrentUserName"/>
      <ParameterBinding Name="Today" Location="CAMLVariable" DefaultValue="CurrentDate"/>
      <ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
      <ParameterBinding Name="dvt_nextpagedata" Location="Postback;Connection"/>
    </parameterbindings>

SharePoint Designer 2013 will not support Design View

Design View removed SharePoint Designer 2013. they say the reason new web standards for client side rendering of pages such as JavaScript, JSON, and OData, there is no longer a need to support a visual web page editor within SharePoint Designer.

Monday, February 25, 2013

Snippets for SharePoint 2013 masterpages and layouts

A snippet is an HTML representation of a SharePoint component or control such as a navigation bar or a Web Part. By using the Snippet Gallery in Design Manager, you can quickly add SharePoint functionality to your HTML master page or page layout.
To insert a snippet:
1.       Browse to your publishing site.
2.       In the upper-right corner of the page, choose the Settings gear, and then choose Design Manager.
3.       In Design Manager, in the left navigation pane, choose Edit Master Pages or Edit Page Layouts, depending on what type of file you're editing.
4.       Select the name of the master page or page layout that you want to add snippets to.
5.       To open the Snippet Gallery, choose Snippets in the upper-right corner of the server-side preview.
6.       On the ribbon, on the Design tab, choose the snippet that you want to add to your page.
To Understand the markup in an HTML snippet check url:

Creating a Custom Page Layout in SharePoint 2013

To Create a Custom Page Layout in SharePoint 2013 do the following steps:

  1. Create Content Type:
    1. From Site Settings select Site Content types
    2. Press button Create to create Content Type 
      Select parent content type from: Publishing Content Types
      Parent Content Type: Page  Layout
    3. Add the following fields to the content type:
      • LargeHeadline – Single line of text
      • RightHandBlurb – Multiple lines of text
      • LeftLinkList – Full HTML
      • LeftColumnTitle – Single line of text
      • LeftColumnText – Full HTML
      • RightColumnText – Full HTML
  2. Creating a Page Layout:
    1. Go to the Design Manager
    2. Edit Page Layouts
    3. Create a page layout
  3. Publishing Your Page Layout
    To publish your page layout, go to Site Settings –> Master pages and page layouts. 
    To publish your layout, click on the HTML file and then Publish this will reflect also in aspx:




  4. Creating a Page:





  5. Now we can publish our page.
  6. Customizing Page Layouts. There are two ways to grab the file: 
    1. Go to Design Manager –>3. Upload Design Files and map a network drive to your master page directory.
    2. Go to Site Settings –> Master pages and page layouts and you can download your file.
    3. Moving the snippets provided by SharePoint 2013 into the appropriate spots,  to customize layout page.

Sunday, February 24, 2013

Creating a Custom Master Page in SharePoint 2013

 To Create a custom master page in SharePoint 2013:
  1. Design your master page as html with structure folder:
  2. Go to The Design Manage
  3. Mapping to the Master Page Directory by Edit Master Pages:

  4. Click on that link and you will see this dialogue box:
  5. If you use  Windows Server 2012  you need to install feature “Desktop Experience” for next steps.

  6. You need to select the folder containing Master Page and Page Layouts as well as their dependent assets (CSS files, scripts, images, etc.). To do this:

    • Go to Windows Explorer, right click on your computer and select Map Network Drive. 

    • Connect to network drive
    • Select url to map to folder
       
    • Now we can simply copy our template and dependent files into this folder
  7. Now you can select your html master page and click insert.
    NOTE: SharePoint 2013 expects your HTML to be XML Compliant. If you have older or non-compliant HTML you will get an error. Fix your file and try again.
  8. Press Conversion and successful link to see preview of this page.

  9.  At the bottom of the page you will see a Yellow Box that represents the place holder where dynamic content is going to be inserted. We're going to now move that place holder into where we want it to replace our dummy text in the middle of the page.
  10. Download the HTML file from the Share Point 2013 environment and open it in your HTML editor and you will see that Share Point 2013 has decorated your HTML with a number of tags.  These tags are used by Share Point 2013 as markup to specify where to put to insert content when it generates the Master Page. 
  11. Publish HTML file it will reflect automatically in master file.

SharePoint 2013 Customize master-page


To Customize sharepoint master-page:
  1. Open SharePoint 2013 in SharePoint Designer 2013
  2. Find corresponds html to your master page 
  3. Edit in advanced mode
  4. Add html before end of workspace div:
    <div class="s4-notdlg" id="Footer" style="background: black; color: white;"> © CopyRight 2013</div> </div> 
  5. Check the result

Saturday, February 23, 2013

SharePoint Server 2013 Top New Features for Public-Facing Internet Sites

This blog will list top new features of SharePoint 2013 for Publishing Site:

Publishing:
  1. Catalogs 
  2. Cross-site Publishing 
  3. Content (by) Search Web Part 
  4. Multiple SPSite URLs 
  5. Managed Navigation
Multilingual Sites:
  1. Improved Variations 
  2. Integration with Cross-site Publishing 
  3. Improved Metadata Management 
  4. Machine Translation Service 
  5. Country Code Top-level Domains
Content:
  1. Cleaner HTML markup 
  2. Image Renditions 
  3. Video Improvements
  4. Content Copy-Paste 
  5. Custom Error Pages  
Look and Feel:
  1. Design Manager 
  2. Composed Looks 
  3. Theming Model 
  4. Device Channels 
  5. HTML 5 Compatibility
Search Engine Optimization (SEO)
  1. No Home Page Redirection  
  2. Robots.txt and XML Sitemaps 
  3. Friendly URLs
  4. Canonical URL Filtering 
  5. SEO Properties
Extensibility
  1. CSOM  
  2. App Model 
  3. REST 
  4. Search 
  5. Mobile