Including static html inside Sharepoint 2010 Master Page - sharepoint

I'm using Sharepoint 2010 with a custom master page. I also have a non-Sharepoint part of the site that has an html file containing content that needs to be on the Sharepoint part of the site as well. I was wondering if it is possible to include the html file inside my master page so whenever the html file is updated, only 1 file needs to be changed?

Can you use the Page Viewer WebPart?
http://office.microsoft.com/en-us/windows-sharepoint-services-help/page-viewer-web-part-HA010024045.aspx
Of course if you place it in the master page, it will have to be a static webpart (no webpart zone)

Related

How to embed external html page in sharepoint 2003

I m new to this sharepoint and we are using 2003 version we want to have one external html page to be embedded in sharepoint 2003. (Simply bringing one external html page throught sharepoint)
If you're using SharePoint Designer, you can add a Page Viewer Web Part to the area of the page where you want to display the external content.
https://support.office.com/en-us/article/Page-Viewer-Web-Part-e364436c-0ec4-4819-acac-1982b3525531
Alternatively, if you're editing the HTML you may be able to get away with using
<iFrame src="<URL to external content>" />.

Add a WebPart to a publishing page layout

I've been trying to figure out a way to add a web part onto a page layout. Whenever I try to add a web part zone or web part via the menus in SharePoint Designer, nothing happens. The web part I selected is highlighted blue, but nothing happens.
I have been trying to add the .webpart code on the .aspx page layout with zero luck.
<WebPartPages:WebPartZone>
<ZoneTemplate>
.webpart code in here!
</ZoneTemplate>
</WebPartPages:WebPartZone>
The above just shows the web part zone, and the ability to add a web part, but doesn't show my web part.
I've tried placing the code outside the Zone Template and the WebPartZone, but I typically just get everything between the property tags displaying as text.
You cannot add the codes to get your webpart embeded on a page , you have to open the page layout in a designer and drop the webpart on that specific area - there may not be anyother work around for this
Regards
Arjun
SharePoint was not updated to support creating the snippet of code to add the WebPart to the Page Layout like it is possible with old fashioned WebParts.
Even when inserted in the Page Layout .html file, it is stripped out when the corresponding .aspx file is generated.
We found a workaround which is far from ideal but works:
Edit your Page Layout as you would normally in HTML
Add a WebPart zone where you would like to see the WebPart
Save the HTML and let SharePoint generate the aspx file
Manually edit the aspx file -- don't use SharePoint Designer, as it will strip out what you added -- with a plain text editor and insert the code from the webpart definition (the XML file)
Save the aspx and when you create a page using the page layout, your SPFx webpart should be there
Note that for the WebParts parameters, it is stored as a JSON structure encoded in HTML. To figure out how to setup default parameters in the inserted WebPart, insert it into a regular page manually and look at what has been generated in the aspx file. Then find the long line that has the encoded JSON structure and copy it back to your edited aspx file.
Finally, never edit/save your page layout HTML file since it ewill then simply override your changes. I would keep a copy of your edited aspx file just in case!
It sounds like you're trying to use a Visual Web Part with SharePoint Online, which you can't do. Web parts for SharePoint Online need to be packaged as a part of a solution.
To deploy a solution to SharePoint Online you need to:
Navigate to the solutions gallery: https://<yourfarmsite>/catalogs/solutions/forms/allitems.aspx
Providing that you are logged in with the correct account and have permissions, this will take you to the solution gallery, where you can upload and activate custom web parts for site.
Click the Solutions Menu
Click Upload Solution
Browse to your custom .wsp file and click OK
After the web part has been uploaded, you can activate it; select the web part and click Activate
Now that the custom web part is uploaded and activated in the Solution Gallery, you can edit the site page that you want to add it to and then add it as per a normal web part.

(SharePoint) How do I add a Calendar app part from a subsite to a parent site?

Basically like the title states, I have a subsite with a Calendar App part and would like to add it onto the landing page of my root site.
I've tried using SharePoint Designer and just copying and pasting out the section but received an error saying the list does not exist.
I'm also unable to get it to work from saving the web part as a file and then uploading into my root site.
Any help is appreciated,
Thanks.
Most web parts are specific to the subsite on which they are displayed. You cannot connect a calendar web part on a parent site out of the box. You'll need to use either a content query web part or build a custom calendar web part. The content query web part will display your items in a list, so if you want a calendar view, you'll either need to heavily format the underlying xsl or go with the custom web part.

How to process SharePoint 2010 publishing page content before rendering?

In SharePoint 2010 is there a way to process the content of a Publishing Page before it is displayed? I would like to use "shortcodes" (eg: [tab], [accordion]), in the content, then parse it into html before it is rendered to the page.
This site may point you in the right direction. He created a master page with a code behind. You could possibly creaet a custom publishing page with a code behind file that alters the contents of your page.

Copy webpart page from one site to another site through sharepoint designer

I am trying to move webpart page containg content editor webpart from the one site to another site through sharepoint designer but the page is moved without its content so how to move page with its content anyone can tell me how to solve this issue.
There are many ways to do that. If you are doing this in development farm you can try SPContentDeploymentWizard. You need to export the page with all it's reference and then import it in destination.

Resources