Posts

Showing posts with the label webparts

Custom Script in SharePoint Online Revisited

The PnP community has become a valuable resource for documentation, sample code, and overall collaboration for all things Microsoft. If you've worked with Office/Microsoft 365, odds are that you've bumped into at least one community-driven component. Here are a few examples: Modern Script Editor SPFx web part that allows the embedding custom html/js/css into a modern page. PnP Modern Search Set of web parts that allow a more customized search experience, which fills some of the gaps left by the highlighted content out-of-the-box web part. Additional background here . Custom list view header One of the many example json styles for customizing content rendering in SharePoint. In this case, it sets a static, customized header instead of the default view header. List formatting has many samples to showcase different customization options. In the meantime, Microsoft is on track to add a few new things, while shutting down a few others. Microsoft has announced deprecations for older...

SharePoint Web Part URL2IMAGE

Image
The SharePoint 2010 URL2IMAGE Web Part enables adding a button to pages that automatically creates a screen shot of the current page. Available features: - CSS customizable button - Displays the resulting shot in a new browser tab Available now

[SharePoint Web Part] Weather Forecast

Image
The SharePoint Weather Web Part for SharePoint 2010 displays weather conditions for the next day(s). Some of the features available: Set up a weather location (City and Country) Multiple service providers (free api key can be acquired) Retrieves json data from service provider Possibility of choosing between 1 and 10 day forecast Sandboxed solution to be deployed into Foundation, Server and Online/Office 365 Available now

Web Part XSLT errors

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator. This is a XSLT error. The question is, is it a sintax error or is the query unable to retrieve the data? - Enable custom errors and open the page with SharePoint designer to look for XSLT errors - Add the existing URL to alternate access mappings in central admin (edit public URL) if you're using a secondary/external URL http://blogs.msdn.com/sharepoint/archive/2007/03/06/what-every-sharepoint-administrator-needs-to-know-about-alternate-access-mappings-part-1.aspx

Multiple Web Part instances on page?

Image
When adding a second instance of a webpart: "Unable to add selected web part(s). xxx Web Part: A Web Part with this ID has already been added to this page. Solution: - Remove ID attribution for main web part class (don't do this.ID="...") - Send webpart id as editorpart parameter and add it to the editorpart id (do editorpart->this.ID="editorpart"+webpartid) http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/03600775-2e0d-426c-9be4-e5db77588d72

SharePoint 2010 Basic DataViews

Simplest things could be crazy to find in 2010. What a fully customizable Data View like in 2007? - SharePoint Designer - Ribbon - Insert - DataView - Empty Data View (chosing this option will enable more design options than usual) - Add a data source - Add a field from the data source - Click "Design" under Data View Tools - Select "Plain list of titles" (this will enable full customization) - Write your own divs / tabs / whatever

Playing audio and video files

<OBJECT id="VIDEO" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject"> <PARAM NAME="URL" VALUE="FileURL"> <PARAM NAME="SendPlayStateChangeEvents" VALUE="True"> <PARAM NAME="AutoStart" VALUE="True"> <PARAM NAME="uiMode" VALUE="none"> <PARAM NAME="PlayCount" VALUE="1"> </OBJECT> FOR WMP 11 <object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="600" height="400" id="mediaplayer1" title="Win Media Player"> <param name="FileName" value="http://Test:2312/MyVideo/clock.wmv"> <param name="AutoStart" value="True"> <param name="ShowControls" value="True"> <param name="ShowStatusBar" value="False"> <param name=...

Expand / Collapse Feature for Web Parts

Great web part for collapsing web part contents You import the webpart to the bottom of the page, (or create a content editor web part and paste the script, hide the chrome) Then, create a new web part (I've created a new CEWP and used chrome as question and body as answer for FAQ look page), or use one you already have. Remember, for auto collapsing at page load, go to webpart properties, apearance, chrome state, "Minimized" You can download & import the dwp CollapseWPs dwp WebPart or create it yourself and add the script to the CEWP's source CollapseWPs script http://pathtosharepoint.wordpress.com/2008/10/25/expandcollapse-buttons-for-your-web-parts

Cool WebParts from TamTam

- Rss reader ( ajax style, caching and no javascipt warnings ) ( strips imgs !! ) - MSN Weather - Facebook based on search/profiles - Birthdays based on search/profiles - Flickr photo webpart (simple) - Flickr photo webpart (with lightbox 2.03) http://tamtam.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=6888

SharePoint WebParts | Browse List Button

Image
You may come to a point where you think it would look a lot better with a browse button with textbox instead of just having a less-intuitive URL textbox. Users never know whether its an absolute, relative to root or relative to web url. So the object is: AssetUrlSelector You can find it in using Microsoft.SharePoint.Publishing.WebControls; You might need to manually browse for the Microsoft.SharePoint.Publishing.dll reference in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI Note: This will only work with MOSS 2007 and not WSS3 since the dll will not be available.

SharePoint WebPart | Deploy into specified webpart category

In your module xml file, add: <File Path="MyWP.webpart" Url="MyWP.webpart" Type="GhostableInLibrary">      <Property Name="Group" Value="My WebParts" /> </File>

SharePoint Web Part | Am I Editing ?

After (too) much searching, I've found a way to check if I'm at display mode, or the page is being edited at a given moment. Here are a few possible alternatives: My thanks to Avinash .

SharePoint 2007 | Web Part Maintenance Page | Existing WebPart ID error

Image
- So you're building webparts and the page is crashing? - Are you getting an annoying error that won't allow you to add your webpart saying: "A Web Part with this ID has already been added to this page" - Let's say your site is, for example: "http://myspsite/default.aspx" - You can add "?contents=1" to the browser's adress bar and try to remove some webparts or even all webparts if needed and the error is sure to go away "http://myspsite/default.aspx ?contents=1 " This one is kind of tricky to get to, but you can get it through the browser - "Site Actions" - "View All Site Content" - "Pages" - Hover a page, like "Default.aspx", click the arrow context menu on that file and select "Edit Properties" - On the bottom of the editing page will se an option saying: "Open Web Part Page in maintenance view" Its amazing what you can find on a sharepoint test server homepage Sources...

SharePoint WebPart | Unexpected Error

Image
So you want to create a new web part with custom editable controls in "Modify Shared Web Part" area ERROR: An unexpected error has occurred. Web Parts Maintenance Page: If you have permission, you can use this page to temporarily close Web Parts or remove personal settings. For more information, contact your site administrator. Troubleshoot issues with Windows SharePoint Services. SOLUTION: - Add constructor to editor file, with ID - Make sure your CreationEditorParts() method is returning something - Make sure you add IWebEditable to header and implement the functions public class MyWebPart: System.Web.UI.WebControls.WebParts.WebPart, IWebEditable /* editor part */ public MyEditorPart() { this.ID = "MyEditorPart"; this.Title = "My Editor Title"; } /* main webpart */ #region IWebEditable Members EditorPartCollection IWebEditable.CreateEditorParts() { try { List editors = new List (); ...

Deploy WebParts as a Feature

http://www.sharepointnutsandbolts.com/2007/05/deploying-web-parts-as-feature.html

Sharepoint | Instalar webpart com ajax / ajaxcontrol tookit

Image
este erro é comum e conhecido por muitos... ... a resposta? ainda não tenho "Extender controls may not be registered after PreRender." este erro não foi resolvido e desisti de usar ajax por estas e outras razões. mas já houve quem conseguiu: http://forums.asp.net/t/1061827.aspx

Sharepoint | Instalar custom WebPart / GAC Util

Para Instalar uma webpart pode-se criar uma nova pelo VS e fazer deploy, e no fim adicioná-la através do menu: site actions, edit page, add webpart ou adicionando a dll ao gac e ao webconfig do site *no w2008 server: c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe /i [O_TEU_DLL] Custom WebPart com aplicação de estilos via XSL e CSS http://www.codeproject.com/KB/sharepoint/SPPagesNavigation.aspx nota: este projecto tem um "Update SharePoint.bat" que instala tudo sem termos que fazer nada ;-) * As dlls são instaladas em c:\windows\assembly

Sharepoint | Eliminar (completamente) webpart

As web parts depois de feito o deplyoment, é muito complexo conseguir a sua remoção. mesmo após ter sido retirada das páginas, poderá residir na galeria. poder-se-á ir a "Site Actions", "Site Settings", "Modify All Settings", e em "Gallery" (Separador central), clicar em "Web Parts" para ver e instalar webparts para desinstalar, pode-se abrir o site com o sharepoint designer apagar a sua referência da pasta _catalogs\wp :-)