How to process SharePoint 2010 publishing page content before rendering? - sharepoint

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.

Related

SharePoint 2013 Page Layout Error

I'm really finding it difficult to set up a new theme for my SharePoint 2013 site.
I have uploaded all other files to the design gallery. But when I uploaded the page layouts, and I try to change the Content Type to Page Layout, I get the error below:
Sorry, something went wrong List does not exist.
The page you selected contains a list that does not exist. It may have been deleted by another user.
Technical Details
Correlation ID: ce2b429d-0147-d0c2-bc23-32b039f7d8a6
Please what can I do to resolve this?
Thanks.
I got it working by disabling the publishing feature under > site settings > Site Collections Feature > SharePoint Server Standard Site Collection features
Deactivate
Reactivate
Rebooted the server (probably could have done an IISReset but
overkill!)
Now I can add layout pages under master pages gallery.
In the browser, go to your site, and on the Site Actions menu, click
View All Site Content, and then click the Pages document library.
Or you can browse directly to
http://your_site/pages/forms/allitems.aspx, where your_site is the URL
for your site, such as fabrikamweb/finance for the
http://fabrikamweb/finance subsite.
The Pages document library is created automatically by the publishing
feature and contains all of the pages in a site that are created from
page layouts. You can look in the Page Layout column to see which page
layout was used for a specific page and then click the link to view
that page in the browser.
https://support.office.com/en-us/article/Customize-a-publishing-page-layout-c10bda25-0145-44c6-ba14-7757176fb47f

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 2013 online customize personimmersive page

I want to customize the SharePoint 2013 online(office 365) "About me" linked page (personimmersive.aspx) to a custom look and feel.
Even clicking on any SPUser name, for ex in a list item modified by is "John Smith" if we click on it goes to about me page.
This page resides under mysite but I cannot see this page is SharePoint 2013 designer to edit, but modifying SharePoint pages in designer is not always the best way.
Can I just create a new page and redirect all Profile page request to that custom page?
IF I create app parts and edit the page I cannot edit the top portion of the page.
redirecting may not be a feasible approach, specially on the online versions
you can try to take advantage of web parts and css to do what you can
The biggest change is that you can’t edit the entire top portion of
the page. These used to be in a web part zone, and you could choose to
add/remove the web parts. Now they are fixed, with no ability to move
them around or change the parts.
We had removed the Activity Feed web part previously because we were
using Yammer newsfeeds and group feeds embedded throughout the site,
and this part always showed “No activities”. Now this is back again,
with no way to remove it, short of editing the page in SharePoint
Designer.
There are still web part zones on the bottom, but really the problem
is no control over the display of most of the top of the page.
http://weshackett.com/2014/04/office-365-new-profile-page/
There is personImmersive.aspx in SharePoint Designer, you should be able to find it in All Files. Just make sure you connect to [your_domain]-my.sharepoint.com instead of [your_domain].sharepoint.com.
you can't customize the page completely.However you can add custom web part and custom css to change the look and feel to a great extent.
#tiago duarte you can still remove the activity web part.This can be done using script editor webpart and hiding the complete block/div.

(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.

RSS Viewer web part not selectable in Sharepoint Designer

I want to place the RSS Viewer web part into a page layout I've created.
In the Sharepoint Designer (Sharepoint 2010) using the "Advanced Edit Mode" I tried to add the RSS Viewer web part but I cannot find it in the list. Under "Insert>Web part" I find many other web parts but the one I need is missing, also under "More web parts..." it cannot be found.
The web part is installed (I activated the feature). The web part can manually be added to a page into a web part zone when I don't use the Designer but edit the page directly in the browser but of course this is not what I need as I have to put it in the page layout.
Anyone got an Idea why the web part is not selectable/visible in the list?
As I've learned not all web parts are available in this listing.
The workaround would be to manually add the desired web part to a webpart zone on the page (not in the designer) and then open the page in the designer so that you can copy/paste the web part relevant code to the page layout of your desire.

Resources