Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
How to get a list of nodes of type document type "inspire" though an UmbracoApiController?
Culture is passed through the query string
ENGLISH - Inspire Node SPANISH - Inspire Node
public class InspirationController : UmbracoApiController { // GET: Inspiration ///Umbraco/API/Inspire/All/?culture= [System.Web.Http.HttpGet] public IHttpActionResult All(string Culture) { if(Culture ==null){ return NotFound(); } System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(Culture); ???? return Json(""); } }
Was been silly used the UmbracoHelper.
[System.Web.Http.HttpGet] public IHttpActionResult All(string Culture) { if(Culture ==null){ return NotFound(); } UmbracoHelper helper = new UmbracoHelper(UmbracoContext.Current); foreach (var a in helper.TypedContentAtRoot()) { if (a.GetCulture().ToString() == Culture) { return Json(a.Id); } } return NotFound(); }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Get list specific pages of known document type based on user language
How to get a list of nodes of type document type "inspire" though an UmbracoApiController?
Culture is passed through the query string
ENGLISH - Inspire Node SPANISH - Inspire Node
Was been silly used the UmbracoHelper.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.