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

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.

Related

create a custom left navigation for default.aspx in sahrepoint O365

I am presently working in Sharepoint O365. I need to build a custom left navigation for only my default.aspx page using Sharepoint designer, while keeping the normal navigation for the rest of the site. I have seen it is possible in Sharepoint 2010. However, I am unaware of any workaround in O365. Any knowledge regarding this shall be appreciated.
Please check the codeless solution:
Custom Left Navigation in SharePoint 2013
Or use custom html code to make a navigation:
https://www.w3schools.com/howto/howto_js_sidenav.asp

How can I get my custom field type (lookup) to render in list view on SharePoint 2013?

I have a custom field type that was built for SharePoint 2010 that I have installed on SharePoint 2013 Foundation. The wsp installed perfectly and I get all the same functionality.
The one problem I am having is how the information is displayed in the list view. I am inheriting an SPFieldLookup and am not doing anything to override how this is displayed in the list view.
On SharePoint 2010 it renders perfectly as a hyperlink to the item which opens the standard pop out window on click etc. On SharePoint 2013 Foundation however the html doesn't render properly at all- it is almost as though it is displaying as plain text.
SharePoint 2010:
SharePoint 2013 Foundation:
My question is how can I get the lookup value to render properly on SharePoint 2013?
The same version of the wsp in installed on both machines.
Unsure as to whether this was simply a browser or client side issue I added a standard lookup field to the list and it renders fine!
I had the same issue with my codeplex project which is based on Lookup field. I added a link to dummy JS file and overrode the JSLink property of the field class. I have blogged about it here: http://sharepointnadeem.blogspot.in/2013/12/sharepoint-2013-upgrade-sharepoint-2010.html
In SP 2013 by default field rendering is done on client side. Concept of JSLink has been introduced if you want to change the look and feel of field.
However by ClientRender=False in new form url you can force it to server render mode.
So after an afternoon of head scratching it turns out that this is not a deployment issue. It probably didn't even warrant a question but for anyone who has the same problem as me...
If you edit the page and modify the listview settings you will see that there is a new setting called "Server Render".
I guess this ultimately gives you more control but in may case it prevented my fields from rendering as expected- turning this on meant my custom fields we once again displayed 'normally'.

Sharepoint 2010 : Hiding Edit in datsheet option from document library only

I am migrating MOSS 2007 site to sharepoint 2010 without UI upgrade. I noticed that document library action tab includes menu called "Edit in datasheet". I need to know how do I hide it from ONLY document library. Please Help.
Another solution. Document Library settings->advance settings-> Allow items in this document library to be edited using the datasheet? = N
A possible way is to edit the Display form for the library DispForm.aspx using Sharepoint Designer and use some client side code (Javascript/Jquery) to hide the button.
If you have access to jquery something like this will do:
$(document).ready(function() {
$("[text='Edit in Datasheet']").remove();
});
Check this article for more details

Adding HTML controls to SharePonint 2010 quick launch

We are migrating Lotus Notes application to SharePoint 2010. There are around 200 views on navigation pane of Lotus Notes. In order to provide similar kind of look and feel on SharePoint I am thinking to add dropdown on quick launch of my site.
Is it possible to add HTML controls like dropdown and add a functionality to navigate to respective view? Or else what could be the better solution for this case?
Thanks,
Pratima
You can use the ASP.NET placeholders available in the masterpage to host a control or WebPart beside the Quick Launch. The actual QuickLauch is generally customized by JavaScript unless you want to replace it with a completely new class.

SharePoint 2010 Ribbon on Application pages

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

Resources