Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Biagio Paruolo 1494 posts 1635 karma points c-trib
    May 27, 2015 @ 14:41
    Biagio Paruolo
    0

    Where is the code of BazaarCheckout DocType?

    I run the Merchello Source v1.9 . I see the DocTypes like BazaarCheckout without properties.

    Where is defined into the code? Why Are there not properties?

  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 27, 2015 @ 20:05
    Rusty Swayne
    1

    The BazaarCheckout document type was added so that we could hijack the route and apply a view assigned by the selected theme. See route hijacking: https://our.umbraco.org/documentation/Reference/Templating/Mvc/custom-controllers

    You can define your own properties on the document type if you want. The model passed to the view is still IPublishedContent so the properties can be retrieved in the same way as you normally would.

  • Biagio Paruolo 1494 posts 1635 karma points c-trib
    May 27, 2015 @ 22:03
    Biagio Paruolo
    0

    Ok, like this example. I understand. Thx.

    public class HomeController : Umbraco.Web.Mvc.RenderMvcController { public ActionResult MobileHomePage(RenderModel model) { //Do some stuff here, the return the base Index method return base.Index(model); } }
  • Biagio Paruolo 1494 posts 1635 karma points c-trib
    May 27, 2015 @ 22:04
    Biagio Paruolo
    0

    Ok, like this example. I understand. Thx.

    public class HomeController : Umbraco.Web.Mvc.RenderMvcController { public ActionResult MobileHomePage(RenderModel model) { //Do some stuff here, the return the base Index method return base.Index(model); } }
  • Rusty Swayne 1655 posts 4993 karma points c-trib
    May 28, 2015 @ 03:02
    Rusty Swayne
    0

    Yep.

    Alternatively you could use:

    public class HomeController : MerchelloRenderMvcController { ....
    

    which will provider access to all of the Umbraco stuff and instantiate things like the CustomerContext and provider access to the CurrentCustomer.

  • 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.

Please Sign in or register to post replies