I want to create a simple drop-down menu with separate options that when selected forward to the associated URL. This is simple in just plain JavaScript but I've run into issues with SharePoint. Are there any solutions using just JS or SharePoint webparts / in browser options (as opposed to coding in Visual Studio or using Designer)?
If you don't want to use Visual Studio or SharePoint Designer, you can also use the default "Content Editor Webpart". You can upload a file that contains the needed html, javascript, ... and then use that file as a content source for the Content Editor Webpart. This is a quick way of adding "enhanced" content.
The prefered way would be to create the webpart in Visual Studio, add the needed css and javascript in the package that you deploy to SharePoint and link the needed files in your webpart.
Related
How to customize the modern SharePoint online list toolbar?
I was not able to find any options that were available in previous versions in SP. I have an option under the "...", toolbar and I want to add it to the toolbar. Also, want to remove the share, export, automate and integrate options from the toolbar.
To customize the modern SharePoint online list menu bar, you have to build a Sharepoint Framework(SPFx) extension.
Reference:
Overview of SharePoint Framework Extensions
Build your first SharePoint Framework Extension
Demos:
How To Hide Command Bar Menu Item Using SPFx Extension
react-application-injectcss
Inject Custom CSS on SharePoint Modern Pages using SPFx Extensions
I have requirement and need a suggestion from you guys. In the below I will state my requirement.
I have a SharePoint 2013 Publishing Site.
This has custom master pages build using some HTML files and custom page layouts.
The client needs to follow the styles according to the clients style guide. For the master pages and the page layouts the styling was not an issue.
The content needed to be follow the same styles as guided by the clients style guide. So we have used 'Script editor' web part to insert the content. But this has a bad influence only the technically skilled users can insert the content.
But if we use the Content editor web part we do not need to use HTML code to insert the content. But the issue is the default content editor web part does not has the styles that relevant to the clients style guide.
Can we create an our own content editor web part that reflect the clients style guide using Visual studio ?
I hope these information is enough to get an idea.
Thanks and regards,
Chiranthaka
Ok guys! Many thanks for your help. I found several articles regarding creating a custom SharePoint 'Custom Content Editor' web part using Visual Studio 2013 and SharePoint 2013 Enterprise. These artcles are somewhat old but we can use them for our purpose.
I will post the URLs for those articles.
Creating a Custom Web Part Editor in SharePoint 2010
Custom Content Editor Web Part for SharePoint
I want to place a content editor Web Part, on an image. Is it possible to do this in SharePoint Designer 2010?
Add both into the page and use CSS and/or JavaScript to do overlay.
I'm using Visual Studio 2010 to develop a SharePoint Server 2010 solution. Part of this includes custom Page Layouts, but when editing them, intellisense is completely broken, since Visual Studio doesn't appear to know how to handle them. Here's what I've done:
Created a new blank solution
Right-clicked on the solution and created a new "Empty SharePoint Project"
Right-clicked on the project and created a new "Module"
Renamed sample.txt to MyPageLayout.aspx or created a new ASPX Web Form
At this point, intellisense for the new Page Layout is broken. It gets even worse with tools like ReSharper installed. Also, things like "Format Document" will break the Page Layout (by for example changing asp:Content to asp:content)
What I've tried to get intellisense working:
Added a Web.config from a standard Web Application Project to the root of the SharePoint Project - made no difference.
Added the ProjectGuid for a Web Application Project to the SharePoint project file - broke the project.
Is there any way to get intellisense, and the rest of the support Visual Studio can offer for Web Forms, available when developing SharePoint 2010 Page Layouts?
I have followed your post to some extent.
Using VS2010 (On an x64 machine)
Create a blank SharePoint solution. (this properly combines your #1 & #2)
Add a module (in SharePoint a module is like a folder or resource container)
added a new class to the module (intellisense present)
Added a new webpart to the module (intellisense present)
added a user control to the project designer works and (intellisense present)
I believe that you should consider creating true server or visual web parts. This will have a harder learning curve but will pay with dividends in the future. You will be able to package and deploy your solution again or to another server/farm. Aspx pages can be added and manipulated by the dreaded SharePoint designer. In 2010 the theory is that those designer mods can be packaged and deployed.
I work in this environment every day and the best advice I can give is to embrace the SP object model and do 'it' the sharepoint way. Don't try to force SP to be something its not. :)
This is probably not the solution you are looking for but it's the best thing I found for SharePoint development.
In your solution, create 2 projects :
1 SharePoint Project (empty or not)
1 ASP.NET web application project
Develop all your UI (aspx pages, ascx controls, etc.) in your ASP.NET project and create post-build steps that will copy the pages and controls to the appropriate folders in your SharePoint solution.
That way, you will benefit from all the features of web development in visual studio and it will be very easy to deploy as well. It is a bit of a time investment at first, but it is well worth it if you have any considerable amount of logic to implement in your aspx pages.
This blog post documents what you need to do.
you can add an intellsense to pagelayouts by closing the page and simply reopen it from
file->openfile->your file page layout path
Or you can directly "Right Click" on the file you want to open from the Solution explorer and then select "Open" : you'll get the Intellisense !
I am trying to get the CAML for a custom content type that I am creating. What I am really doing is creating the content type in Visual Studio 2010 via CAML and then deploying that content type to my sandbox using the new deploy features in VS 2010. At that point, I am modifying the content type using the SharePoint interface (i.e changing advanced settings, adding columns, etc) since it is easy to do via the web interface. What I would like to do, is after I have made my changed, update my CAML in Visual Studio to match my changes.
I want to do this because I am creating custom fields and content types for my project and want to create a solution with these customizations. Since there doesn't seem to be a way to do this (create custom fields and content types) as a solution using SharePoint without putting them into a list, I am using Visual Studio and CAML for this. I also want to use Visual Studio and CAML so that I can put these CAML xml files in source control so that I can version my custom fields and custom types.
I have tried using tools like http://spcamlviewer.codeplex.com/ but that doesn't seem to work with SP 2010.
Does anyone have any suggestions? I wish Visual Studio would just have an update from SP button after I have deployed my solution and made changes on the server so it would sync VS from the SP server.
SharePoint Manager 2010