I have a doubt on SharePoint Site Pages which is customized entirely by removing all asp:Content and replaced with html. The entire page is now composed of html5 tags. Now I need to bring back the Share and Follow buttons that exist in s4-ribbon row. Is there anyway I could add it to the existing page? Please help if possible.
1 Answer
<link href="/_layouts/15/1033/styles/Themable/corev15.css" rel="stylesheet" type="text/css" />
<SharePoint:ScriptLink language="javascript" name="init.js" OnDemand="true" runat="server" Localizable="false" />
<SharePoint:ScriptLink language="javascript" name="MicrosoftAjax.js" OnDemand="true" runat="server" Localizable="false" />
<SharePoint:ScriptLink language="javascript" name="sp.core.js" OnDemand="true" runat="server" Localizable="false" />
<SharePoint:ScriptLink language="javascript" name="sp.runtime.js" OnDemand="true" runat="server" Localizable="false" />
<SharePoint:ScriptLink language="javascript" name="sp.js" OnDemand="true" runat="server" Localizable="false" />
<SharePoint:ScriptLink language="javascript" name="sp.ui.dialog.js" OnDemand="true" runat="server" Localizable="false" />
<SharePoint:ScriptLink language="javascript" name="core.js" OnDemand="true" runat="server" Localizable="false" />
<SharePoint:ScriptLink language="javascript" name="sharing.js" OnDemand="true" runat="server" Localizable="false" />
` function OpenShareDialog() {
alert('hr');
var options =
{
url: _spPageContextInfo.webServerRelativeUrl + "/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1&IsDlg=1",
dialogReturnValueCallback: Function.createDelegate(null, dialogClosedCallback)
};
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}
function dialogClosedCallback(result, target)
{
alert('hi');
}
`
These dependencies will help us achieve the lost custom functionalities. Hope someday it will help someone.
Inside HTML body: