Created
November 4, 2014 15:51
-
-
Save adamhopkinson/1c5ca5eae193ad72d9dd to your computer and use it in GitHub Desktop.
Accessing Sitecore render parameters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var p = Html.Sitecore().CurrentRendering.Parameters; | |
bool fullWidth = (p["Full width"] == "1") ? true : false; | |
string widthClass = (fullWidth) ? "fullwidth" : "indented"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment