Copied to clipboard

Flag this post as spam?

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


  • john blair 48 posts 219 karma points
    Dec 19, 2019 @ 17:17
    john blair
    0

    How does Articulate /blog manage to render given there is no default template for the Articulate Doc Type?

    I normally see a default template or a selected template for a Document Type so that umbraco knows how to render the page. There is no Template defined for Document Type "Articulate" associated with the "/Blog" url - so how does the umbraco run time determine what template to run to render the page?

    I know there are 4 themes for articulate - but how is the plumbing put together so that the selected theme pointing to App_Plugins\Articulate\Themes is actually run?

    I've never seen this behaviour before in umbraco.

  • Shannon Deminick 1530 posts 5278 karma points MVP 3x
    Dec 19, 2019 @ 22:32
    Shannon Deminick
    1

    Articulate uses route hijacking for it's document types and then proxies to the correct theme folder for it's views.

  • Shannon Deminick 1530 posts 5278 karma points MVP 3x
    Dec 19, 2019 @ 22:34
    Shannon Deminick
    1

    For example, the rich text document type and the markdown document type both inherit from this controller and this is how the view is rendered https://github.com/Shazwazza/Articulate/blob/master/src/Articulate/Controllers/BlogPostControllerBase.cs#L13

    The rich text controller is here https://github.com/Shazwazza/Articulate/blob/master/src/Articulate/Controllers/ArticulateRichTextController.cs

    and is named ArticulateRichText which matches the document type name, this is how route hijacking works. There are docs on that here https://our.umbraco.com/Documentation/Reference/Routing/custom-controllers

  • 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