Skip to content

Instantly share code, notes, and snippets.

@rbaty-barr
Created May 13, 2016 15:32
Show Gist options
  • Save rbaty-barr/45aafb7ae93a7e4dce965c53b66bc35d to your computer and use it in GitHub Desktop.
Save rbaty-barr/45aafb7ae93a7e4dce965c53b66bc35d to your computer and use it in GitHub Desktop.
// this can be used right on a template
// example woudl be to redirect FAQ Items up to the parent category
// this example has a built in achor to expand a hide show item on the parent
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
}
@{
var faqCat = Model.Content.Parent;
var newUrl = faqCat.Url + "#HSCol-" + Model.Content.Id;
Response.Redirect(newUrl);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment