Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
README
collapse_icon.png
expand_icon.png
jquery.sfplaceholderlabels.js
jquery.sfplaceholderlabels.min.js
style.css

README

[sfPlaceholderLabels - jQuery Content Placeholder Labels for Sitefinity]

Works with Sitefinity version 4.0 and above.

=======================================================
Release Notes
--------------------------
1.0.0 - Initial release
1.1.0 - Added configurable options (initVisible, collapseEnabled, expandOnHide)
		Changed the cursor to a pointer when hovering over the expand/collapse control
		Added a title to placeholders that have the label hidden
		Added the ability to toggle the visibility of the labels by pressing the 'z' key
1.1.1 - Fixed a min-height bug that kept placeholders from shrinking when widgets were removed



Options: (Default)
=============================
initVisible: true, // placeholder labels will be visible when the page loads
collapseEnabled: true,  // expand/collapse control will be available
expandOnHide: true, // when hiding the labels with the 'z' key, collapsed containers will be expanded



Basic Installation:
=============================
Add links to the JS and CSS files to the master page
--------------------------
<link rel="stylesheet" type="text/css" href="/sfplaceholderlabels/style.css" />

<script type="text/javascript" src="/sfplaceholderlabels/jquery.sfplaceholderlabels.min.js"></script>


Example Usage:
--------------------------
$(function () {
	$('#sfPageContainer').sfplaceholderlabels({
		initVisible: true,
		collapseEnabled: true,
		expandOnHide: true
	});
});



=============================
To run the script ONLY in design mode:
=============================
Add this to the declarations section of your master page
--------------------------
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.PublicControls" TagPrefix="sf" %>


Add this to the <head> section of your master page
--------------------------
<sf:CssEmbedControl ID="sfPlaceholderLabelsCSS" runat="server" Url="~/sfplaceholderlabels/style.css" Enabled="false" Visible="false" MediaType="screen"></sf:CssEmbedControl>

 
Add this to the Page_Load of your code behind for the master page
--------------------------
if (this.IsDesignMode())
{
	this.sfPlaceholderLabelsCSS.Visible = true;
	this.sfPlaceholderLabelsCSS.Enabled = true;
	ScriptManager.GetCurrent(Page).Scripts.Add(new ScriptReference("/sfplaceholderlabels/jquery.sfplaceholderlabels.min.js"));
	ScriptManager.RegisterStartupScript(this, this.GetType(), "sfPlaceholderLabels","$('#sfPageContainer').sfplaceholderlabels();", true);
}
Something went wrong with that request. Please try again.