Wednesday 22 January 2014

How to Embed A PDF into A Webpage


Hear are the steps:


1.    A Text File .txt
2.    Content Editor Web part
3.    A SharePoint Page


The first step to showing the PDF within a webpage is to store the PDF on your SharePoint site where users will be able to access it.  Once you have uploaded your PDF copy the URL for the newly uploaded PDF file.
After you have uploaded the file, create a new text .txt document in Notepad.  Insert the below code into your text file, but replace the “Your URL HERE” with the URL of your PDF File.  Make sure to leave the “  “at each end since that is needed.

<embed src="YOUR PDF URL HERE.pdf" style="width: 100%!important; height: 1000px!important;style="z-index:-5;" scrolling="no" frameborder="no" allowtransparency="true">

Now that the file has been created, store the text file somewhere on your SharePoint site so we can link a content editor Web Part to it.
Place the content editor Web Part on your page and link it to the text file that you just uploaded, apply the changes, and save the page.  You should now your PDF within the browser!

Corrupt / Broken Web Part No Worries! How to Access the Web Part Maintenance Page


From time to time a web part can become corrupt or broken making it impossible to delete, edit, remove, etc from the page.  This can be an enormous headache and a very annoying scenario when you first encounter it.  The easiest way to remove the broken web part is by utilizing the web part maintenance page.  To access the page, simply put “?contents=1” at the end of your URL.  For example if my page was:
us/sitename/pages/ExamplePage.aspx
I would use us/sitename/pages/ExamplePage.aspx?contents=1 to access the web part maintenance page.  From this page you can easily see which web parts are being used on the page and easily delete the one(s) that are corrupt or broken.

How to create a blog in SharePoint 2013

How To


1) Log into SharePoint.

2) In the Quick Launch bar, click on Site Contents.

How-Create-Blog-SharePoint-2013-1

3) Click on new subsite.

How-Create-Blog-SharePoint-2013-2

4) Fill in the details of your new subsite the same way you would for a new site: titledescriptionURL,language and template.

How-Create-Blog-SharePoint-2013-3


5) If you wish to have the same user and content permissions as the parent site, click the Use same permissions as parent site radio button. If you wish this subsite to have different permissions than other parts of your site, click on Use unique permissions.
Determine if this subsite will show up in the Quick Launch bar and top link bar of the parent site by selecting Yes or No.
Choose to have the parent site top link bar as this subsite’s top link bar by clicking on Yes, otherwise click on No.

How-Create-Blog-SharePoint-2013-4

6) Your new blog site will be successfully created.

How-Create-Blog-SharePoint-2013-5

Sunday 19 January 2014

Upload page layouts and create new pages in a publishing site

About page layouts
page layout is a template for a page in your site. This is where you define the layout and structure for the body of a page.
Page layouts contain page field controls and Web Part zones. Page field controls and Web Part zones are placeholders that define where content can be added by authors. They are added to a page layout at a specific position, for example on the left side of a column, and with specific style elements, such as bold.
SharePoint page layout
In my previous blog post, I explained how SharePoint Server 2013 automatically converts an HTML master page into an ASP.NET page. The same rule applies to page layouts - you can create a page layout in HTML format, and SharePoint Server 2013 will automatically convert it into an ASP.NET page for you.  This means that when you design your page layout, you can do this in your favorite HTML editor, focus on HTML, CSS and JavaScript, and you don't have to worry about ASP.NET or SharePoint-specific markup.

About pages and rendered pages
It is important to understand that authors do not add content to a page layout.  Content is added to apage
A page is created based on a specific page layout. Once you've created a page, authors can add content that they want to display on their website to the page. Because the page is based on a page layout with page field controls and Web Part zones, authors cannot add content outside of these areas.
When visitors browse a site, they will see a rendered page. In a rendered page, the master page is merged with the page layout, and the content for the page is displayed in the page fields and Web Part zones.
SharePoint rendered page
For more information, see Overview of the SharePoint 2013 page model.

How to upload a new page layout
In our Contoso scenario, we have two page layouts; one for the category page, and one for the catalog item page.
In my previous blog post, I showed you how to map a network drive. Because we have mapped our network drive, uploading these page layouts becomes very easy. Simply drag and drop the files into your Master Page Gallery.
Drag and drop page layouts
In SharePoint, refresh the Master Page Gallery page to see that the two page layouts have been added. Also notice that an associated ASP.NET file has been created for each of the page layouts.
Master Page Gallery

How to turn off versioning for the Pages Library
In our scenario, I am not using SharePoint workflows for approval. My files have already been approved, so before I create a new page, I want to turn off versioning for the Pages library.
To turn off versioning for the Pages library:
  1. From the Site Settings menu, select Site contents.
Site contents
  1. On the Site Contents page, click Pages.
  2. In the Pages library, on the LIBRARY tab, click Library Settings.
  3. On the Settings page, click Versioning settings.
  4. In the Require Check Out section, for Require documents to be checked out before they can be edited, select No.
Library versioning settings

We are now ready to create our two new pages.

How to create a page based on a page layout
To create a new page:
  1. On the Site Contents page, click Pages.
  2. In the Pages library, click the FILES tab, and then click New Document.

Upload New document
  1. On the Create Page page, enter a Title and a URL name. From the Page Layout list, select the page layout that you want to apply to the new page. In our scenario, the page layout is the  newly uploaded page layout called ContosoElectronicsCategoryPageLayout.
Create category page
 After you click OK, the newly created page is shown in the Pages library.
Category page created
In our Contoso scenario, we will also need a catalog item page. To create this page, I repeat steps 3 and 4 from the previous procedure, however for Page Layout, I selectContosoElectroniceCatalogItemPageLayout.
Create catalog item page
 Our Pages library now contains two new pages: ContosoCategoryPage and ContosoCatalogItemPage.
Catalog item page created
Now that we have created these pages, the next step is to assign them to the terms that drive our site navigation.

Upload and apply a new master page to a publishing site

About the master page

master page defines the common layout and interface that you see on all your webpages, such as logo, title and navigation menu.
Layout and interface for the individual pages, such as the home page, or the page that displays Audio products, are handled by page layouts. I'll talk more about them in later blog posts.
SharePoint page model

In previous versions of SharePoint, you had to design master pages in ASP.NET. These master pages also had to include SharePoint specific markup, such as controls and content placeholders.
In SharePoint Server 2013, you can create a master page in HTML format, and SharePoint Server 2013 will convert this into an ASP.NET page for you.  This means that when you design your master page, you can do this in your favorite HTML editor, focus on HTML, CSS and JavaScript, and you don't have to worry about ASP.NET or SharePoint-specific markup.
When you add an HTML master page to SharePoint Server 2013, an associated ASP.NET master page will be automatically created.  Because the two files are associated, any changes you make to the HTML master page will be automatically updated in the associated ASP.NET master page .
For more information, see Overview of the SharePoint 2013 page model.

About the Master Page Gallery
In our scenario, we have an HTML master page and some design assets, such as a CSS file and images, that we want to upload and apply to our Contoso site. All these files are stored on my local computer.
SharePoint expects to find design files in the Master Page Gallery, so this is where we should upload the files. To get to the Master Page Gallery, go to Site Settings --> Master pages and page layouts.
Master Page Gallery
You can use the Upload Document button to upload a single file to the Master Page Gallery. However, using this button every time you want to add a document can be somewhat cumbersome. To make life easy for yourself, you can map your network drive. This will enable you to drag and drop files into the Master Page Gallery with Windows Explorer.

How to map your network drive
  1. From Settings menu, select Design Manager
Select Design Manager
  1.  On the Design Manager Welcome page, click 3. Upload Design Files.
Upload Design Files
  1. On the Upload Design Files page, copy the URL to your design files.
URL to Master Page Gallery

Note: The next steps will vary depending on your computer's operating system. My computer is running Windows 8, so I will show you how to map your network drive from Windows 8.
  1. Open Windows Explorer. Right click on Network, and select Map network drive.
Map Network Drive
  1. In the Folder field, paste the URL that you copied in step 3. Click Finish.
Finish mapping network drive
  1. An explorer window with your Master Page Gallery content opens.
Master Page Gallery in explorer


 How to turn off versioning for the Master Page Gallery
In our scenario, I am not using SharePoint workflows for approval. My files have already been approved, so before I upload a new master page, I want to turn off versioning for the Master Page Gallery.
To turn off versioning for the Master Page Gallery:
  1. On the LIBRARY tab, click Library Settings.
  2. On the Settings page, click Versioning settings.
  3. On the Versioning Settings page, in the Content Approval section, for Require content approval for submitted items, select No.
  4. In the Document Version History section, for Create a version each time you edit a file in this document library, select No versioning.
  5. In the Require Check Out section, for Require documents to be checked out before they can be edited, select No.
Turn off versioning

Now we're ready to upload a new master page. 

How to upload a new master page
Because we have mapped our network drive, uploading a new master page becomes extremely easy. Simply drag and drop the file into your Master Page Gallery.
Drag and drop design files

If you have any associated design files, such as CSS files or images, you can drag and drop these into the Master Page Gallery as well.
In SharePoint, refresh the Master Page Gallery page to see that the new HTML master page has been added. However, note that an associated ASP.NET master page has not yet been created.
HTML master page is added

Because we dragged and dropped the HTML master page into the Master Page Galley, the content type associated with the file is Design File. For SharePoint Server 2013 to create an associated ASP.NET master page, we have to change the content type for the newly uploaded HTML master file. This is done by changing the file properties.
To change the file properties:
  1. On the Master Page Gallery page, select the newly uploaded master page, and then click Edit Properties.
Edit Properties of file
  1. In the Content Type section, select HTML Master Page.
  2. In the Compatible UI Version(s) section, select 15.
Set properties of file
On the Master Page Gallery page, we can see that an associated ASP.NET master page has been created.
ASP.NET file created

We are now ready to apply our new master page.

How to apply a new master page
To apply a new master page:
  1. From the Site Settings page, click Master page (under Look and Feel).
  2. From the Site Master Page section, from the Specify a master page to be used by this site and all sites that inherit from it, select the newly uploaded master page. In our scenario, this isContosoElectronicsMaster.
Apply new master page

By clicking on the Audio page, we verify that our new master page is now being used.
New master page in use

How to create a Search Center Site Collection and enable crawling of your content in SharePoint 2013

How to create a Search Center Site Collection

To create a Search Center Site Collection, go to Central Administration --> Create site collections, and then enter details for the site collection. Here’s what you need to enter:
  1. title for the website.
  2. The website’s URL.
  3. Select 2013 for the experience version.
  4. From the Enterprise tab, select Enterprise Search Center.
  5. In the field Primary Site Collection Administration, enter the site admin’s user name.
Create a Search Center Site Collection
Now that you have your Search Center Site Collection, you can move on to crawling content.

How to start a full crawl in Central Administration
Before you can start a full crawl in Central Administration, you have to specify the content source that you want to crawl. When you run a full crawl, all content in the content source is crawled even if that content has already been added to the search index.
In a scenario where you only have SharePoint content, you can select to crawl the Local SharePoint sites content source.
  1. Go to Central Administration --> Manage service applications --> Search Service Application--> Content Sources.
  2. On the Manage Content Sources page, hover over the Local SharePoint sites content source, and select Start Full Crawl from the menu.
Start Full Crawl in Central Administration
The status of the crawl is shown in the Status column.
  1. Refresh this page until you see that the value in the Status column is Idle. That means that the full crawl has finished.
Idle crawl status
  1. Optionally, you can verify that your items have been added to the search index by clicking Crawl Log.

    In my scenario, I could see that there were 157,297 items in the search index.
Information in crawl log

 How to enable continuous crawls in Central Administration
By default, content is automatically crawled every 4th hour.  However, when changes are made to your content, you probably would like it to be crawled as soon as possible so that users can find it on the Search Center. Nobody wants to manually start a full crawl every time a change is made to their content, as this is neither an efficient nor practical way to work. So, to avoid this overhead, you can simply enable a continuous crawl of the content source that contains your content.
Continuous crawls start automatically at 15-minute intervals. Any changes that have been made to your content since the previous crawl are picked up by the crawler and added to the search index.
To enable continuous crawls:
  1. Go to Central Administration --> Manage service applications --> Search Service Applications --> Content Sources.
  2. On the Managed Content Sources page, click the content source that you want to enable continuous crawl for.

    In my scenario, this was Local SharePoint sites.
  3. Select Enable Continuous Crawls.
Enable Continuous Crawls in Central Administration

How to set the continuous crawl interval
The default interval for continuous crawls is 15 minutes. However, you can set shorter intervals by using Windows PowerShell. The code snippet below sets the continuous crawl interval to 1 minute.
$ssa = Get-SPEnterpriseSearchServiceApplication
$ssa.SetProperty("ContinuousCrawlInterval", 1)
So, by enabling continuous crawls, your search index is automatically updated with the latest changes. However, there are some types of changes, for example, if you enable managed properties as refiners (I will show you how to do this in a later blog post), where continuous crawls are not sufficient to update the search index. For these changes to be updated in the search index, you have two options:
  • Do a full crawl.
  • Do something called reindexing.
The reason why you have two options is that people working with content (let’s call them content managers) are not likely to have Search service application administration level rights, that is, they don’t have access to Central Administration where they can start a full crawl. However, content managers are likely to have Site Owner rights, and Site Owners can do reindexing.

How to reindex a list
To mark a list or library for reindexing, here’s what to do:
  1. On your list or library click the LIST or LIBRARY tab --> List Settings or Library Settings -->Advanced Settings.
  2. On the Advanced Settings page, click Reindex List or Reindex Document Library.
Select to Reindex list
The list will be reindexed during the next scheduled crawl.
So, all in all, content managers can be happy because their content is added to the search index at short intervals, and Search service application administrators can be happy because they are not bothered by content managers constantly asking them to start a crawl.
And now that we have done all that “boring” stuff, it is time to move on to the exciting stuff: configuring the Search Center.

SharePoint 2013 - Introduction, Features, and Roles

Introduction

Welcome to the world of SharePoint 2013. SharePoint 2013 Production version is released & Live implementations are going on. In this article I would like to re-iterate the features of SharePoint as a whole & advantages of going with it.

What is SharePoint?

In short, SharePoint is a browser-based collaboration, content management, and extensible platform from Microsoft. The latest release of the product is SharePoint 2013.

What are the previous versions of SharePoint 2013?

The previous two versions are MOSS 2007 and SharePoint 2010.

What are the features of SharePoint?

Depending on the business perspective the features of SharePoint are many:

How to Install SharePoint 2013?

As SharePoint is a server side software, it requires the Windows Server operating system. You can start with a new installation or use a Virtual Machine. Once you have the Operating System ready, you can download and install SharePoint 2013 from the following link: http://technet.microsoft.com/en-us/evalcenter/hh973397.aspx.

Hardware Requirements

Following are the core hardware requirements:
  1. CPU 64-bit
  2. RAM 8 GB
  3. HDD 80 GB

Software Requirements

Following are the software requirements:
  1. Windows Server 2012
  2. Microsoft SQL Server 2012 64-bit
  3. Internet Information Services 7.5
  4. Microsoft .NET 4.5

SharePoint Roles

In this article I would like to discuss the various SharePoint Roles. SharePoint Roles and Assignment to people is an essential step towards SharePoint project analysis and implementation.
Following are the most important Roles, I could identify here:
  • SharePoint Architect
  • SharePoint Developer
  • SharePoint Designer
  • SharePoint Administrator
  • SharePoint Trainer
  • SharePoint Power User
  • SharePoint User
The role involvement is depicted below:
Now let us explore what each Role performs.

SharePoint Architect

Following are the responsibilities of Architect:
  • Should be an expert in SharePoint, .NET, and SQL Server
  • Analyze requirements and gain business objectives
  • Collaborate with Customer
  • Define and implement Governance Plan
  • Architectural decisions on number of servers, capacity planning, taxonomy, etc.
  • Direct developers in building custom solutions
  • Direct administrator on SharePoint infrastructure usage
  • Configure search center, business intelligence
  • Decide on Hold, Retention policies
  • Ensure performance and monitoring mechanisms of the implementation

SharePoint Developer

Following are the responsibilities of Developer:
  • Develop custom solutions for SharePoint involving Web Parts, Workflows, Object Model
  • Submit Deployment Package to administrator
  • Should have a good knowledge with SharePoint Out of Box features and programming in .NET
  • Responsible for running unit tests, memory tests involved in development

SharePoint Designer

Following are the responsibilities of Designer:
  • Expert in HTML, CSS, XML, Master Pages with good understanding of SharePoint features
  • Provides customization of SharePoint Site Pages
  • Implementation of branding
  • Responsible for the non-programming customizations of SharePoint

SharePoint Administrator

Following are the responsibilities of Administrator:
  • Expert in SharePoint Out of the Box features, Active Directory, with good amount of networking skills
  • Setup Windows Server, SharePoint Servers, Services, Active Directory, IIS etc.
  • Monitor the health of Servers, implement retention policies
  • Performs Site Collection setup, DNS mapping, users, and Permissions setup
  • Assigns new users to groups and sets access to sites based on requirement
  • Coordinates with network administrator
  • Deploy new solutions, components to SharePoint server
  • Executes PowerShell scripts
  • Performs backup of content database

SharePoint Trainer

Following are the responsibilities of Trainer:
  • Expert in SharePoint from user point of view
  • Well knowledge with SharePoint compatible browser, Office applications
  • Train customers to a good amount of confidence with implementation
  • Train customers in creating Sites, Libraries, Lists and using Office Integration, Search

SharePoint Power User

Following are the responsibilities of Power User:
  • Power User is a User with a good amount of knowledge in SharePoint features
  • Should be guiding other users during times of difficulties

SharePoint User

Following are the responsibilities of User:
  • Should be expert in business functionality and knowledgeable with SharePoint implementation.
  • Performs his/her activities through SharePoint.
Please note that Power User and User are scoped from the Customer side. SharePoint Administrator can be from the customer side if it is a customer maintained implementation. In specific scenarios the customer might rely on third party companies to administer SharePoint implementation, where the Administrator will be external to customer premises.