Created
May 5, 2015 08:00
-
-
Save netsi1964/a3cccab7c11aba668e8d to your computer and use it in GitHub Desktop.
Dynamicweb JSON master and Layout
This file contains 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
<!--@MasterPageFile(MasterJSON.cshtml)--> | |
<!--@Layout.Title(JSON)--> | |
<!--@Layout.Description(This is useful for returning JSON)--> | |
<div class="dwcontent" title="main" id="main"></div> |
This file contains 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
@using Dynamicweb | |
@using System.Web | |
@{ | |
var request = HttpContext.Current.Request; | |
var response = HttpContext.Current.Response; | |
response.AddHeader("Access-Control-Allow-Origin","*"); | |
} | |
{"PageID":@GetValue("Global:Page.ID") | |
,"PageTitle":"@GetValue("Title")" | |
,"DateShort":"@GetValue("DWDateShort")" | |
,"AreaID":@GetValue("DwAreaID") | |
,"content":{"main":@GetString("DwContent(main)")}} | |
@if(1>2) { | |
<!--@ContentPlaceholder--> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment