SharePoint 2010 Ribbon on Application pages - sharepoint

I'm trying to create a SharePoint 2010 application page (AKA layout page) to display some information and allow users to perform some custom functionality.
I need to display custom ribbon tab for the functionality that I want to perform. And I want this custom tab to be displayed on the application page that I've created.
I've managed to create a custom ribbon tab and display it on list view ribbon through a SP feature. But how can I register this custom ribbon tab so that I will display on the application page that I've created?
Thanks,

Seems like you're looking for RibbonLayoutsPage class from Ribbon Utils for SharePoint 2010.
http://spribbon.codeplex.com

Is the custom application page in the _layouts folder and extends from LayoutsPageBase?
http://msdn.microsoft.com/en-us/library/ms460194.aspx
CustomActions have four possible RegistrationTypes
List
ContentType
ProgId
FileType
An application page has no List or ContentType, I dont think it is a ProgId (like infopath), that just leaves FileType. I have tried RegistrationType=FileType with RegistrationId=aspx but that doesn't work.
I'm just trying to think if i have ever seen an application page with ribbon buttons, but can't remember any. So I'm thinking it is not possible.
The ribbon definition does seem to have any either.
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML

Related

how can I embed server codes in sharepoint pages

We have a SharePoint site with a lot of pages. we create pages using SharePoint wizard not in VS. I need to add in one page and use a server code to read from session and write in this label.
After I open a page in VS I only see some code in comments.
How can i do this?
Create Visual webpart and add it on page. or use delegate control with user control.

Can't get ribbon to show with IsDlg=1 on Application Pages

I am using SharePoint 2013.
I am using a modal dialog with the SP.UI.ModalDialog.showModalDialog method.
I also have a Ribbon in the custom application page.
This all worked in SharePoint 2010, but in 2013 it doesn't work. The ribbon is no longer showing.
How can I resovle this?
In the SharePoint 2013 masterpage the elements that shouldn't be visible in the dialog mode (IsDlg=1) have the "s4-notdlg" CSS class applied.
To solve your problem you have the following options:
Dynamically (using jQuery for example) remove the s4-notdlg class form the div of the.Ribbon section
Use the open-source library SharePoint 2013 Easy Ribbon API. We have tested this library with custom application pages, and it seems to satisfy all our needs.

How to make document library in top level visible to subsites

I'd like to ask if you came up with a solution that will allow for subsites to access a centralized document library at the parent level. I'm still trying to no avail. I've tried doc library templates, views, Doc Center and the best method i have OOTB is a page view web part on the subsites page display a view from the parents library. (by the way to remove the ribbon, append ?IsDlg=1 to the url and the ribbons hidden) cool tip. Say will you give be a Y/N on a solution that will allow one to keep a set of documents in the doc center and surface them in the sub-site.
There are another option without such hard coding. You can open any view of your document library, as mentioned earlier AllItems.aspx for example with SharePoint Designer. Open it for editing in advanced mode (there are option when you click right mouse button on file in SP Designer). Then just point mouse cursor inside web part and chose in ribbon web parts, Add to Site gallery, see the picture. Fill in name of new web part. That is all, now you can add this web part on any page on any web site from webpart gallery through the user interface or through the SP Designer by clicking Insert, Web Part in the ribbon on any page.
You can do this by editing the AllItems.aspx (or other view page) and scraping off the WebPartPages:ListViewWebPart and pasting it into a page on the subsite.
This will give you an error "List does not exits The page you selected contains a list that does not exist."
Then you need to get the WebID for the root site (where you took the ListViewWebpart from and replace the part of the webpart that looks like this:
<WebId xmlns="http://schemas.microsoft.com/WebPart/v2/ListView">00000000-0000-0000-0000-000000000000</WebId>
with (for example)
<WebId xmlns="http://schemas.microsoft.com/WebPart/v2/ListView">7b04dee8-b120-4dee-abea-28b77316ec7d</WebId>

SharePoint 2010 custom breadcrumb, change only HTML

I have a requirement for changing the way bread crumbs looks in sharepoint. Please note that the data source will still be sharepoint but i need to generate the html little differently than the one displayed by sharepoint.
for example, if you are in a custom list,sharepoint displays as site > custom list > all items.
I neeed to display site, custom list and all items (no change in the items that are got from sharepoint). The only change will be, the user interface will be generated with a combination of html ul tags with some custom css?
Can someone suggest me the best approach?
Thanks
The visual appearance of the SiteMapPath control that displays a breadcrumb can be modified by setting the attributes of the control or by configuring the templates that are available for the control. I think that the CssClass and NodeTemplate properties is what you need.
How to: Customize the Appearance of SiteMapPath Web Server Controls
SiteMapPath Properties
Using a template with the SiteMapPath control
To modify the content of the breadcrumb you need to create a custom site map provider inheriting from SPContentMapProvider.
SharePoint Branding Issues: Breadcrumb
How to Create custom XMLSiteMapProvider and render it in SharePoint 2007 MOSS

Sharepoint 2010 add,edit,delete forms replace to custome visual web parts

It`s possible in sharepoint 2010, will set up a list of custom data source and then adapt new input forms from visual web parts which will replace the existing add, edit and delete forms?
if it is possible, then how?
Here is an article on MSDN that describes how to use InfoPath to customise the Display, Edit and New forms for external list data (business connectivity services).
Just like in SharePoint 2007 you can change the association of the New, Edit and Display forms using SharePoint Designer in SharePoint 2010. You can create new ASPX pages, or use InfoPath forms as per the above. These ASPX pages can contain the functionality you want directly, or host visual web parts with the right permissions.
Here is an article that describes how to change the associated forms for a list with SharePoint Designer. I would recommend creating new pages and associating the list to those rather than trying to update the existing pages. This avoids any problems if the out of the box files are updated by a service pack / hotfix etc, and also allows you to revert to the out of the box forms if needed.

Resources