Copied to clipboard

Flag this post as spam?

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


  • Carl Jackson 139 posts 478 karma points
    Sep 22, 2015 @ 10:22
    Carl Jackson
    0

    Templates / document types showing as pages.

    I have just noticed that templates/ document types display in the umbraco front end as an actual page but with the sites root node as content.

    For example - with a document type with alias "ContentPage" and matching template

    Visiting /contentpage will show the content page populated with content fields from the root node.

    Is this normal behavour? Is there a way to stop this happening or have I done something to cause this?

    Thanks

    Carl

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Sep 22, 2015 @ 10:27
    Dennis Aaen
    1

    Hi Carl,

    Yes it´s normal behavior that you can visit /contentpage. It´s used for alternative template. Try to see this video about the subject on Umbraco TV

    https://umbraco.tv/videos/umbraco-v7/implementor/fundamentals/templating/alt-template/

    Hope this helps, you understand why this is possible.

    /Dennis

  • Carl Jackson 139 posts 478 karma points
    Sep 22, 2015 @ 10:51
    Carl Jackson
    0

    Thanks Dennis

    Is there a way of disabling?

    It becomes a real issue when you have templates which are only used for displaying information to logged in users but any page can be displayed using that template.

    Thanks

  • Carl Jackson 139 posts 478 karma points
    Sep 22, 2015 @ 10:59
    Carl Jackson
    100

    I think the solution to disabling it is to remove the "SearchForTemplate" 404 handler from 404handlers.config

    as suggested here

    Any reason this would break anything else?

    Thanks

    Carl

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Sep 22, 2015 @ 11:19
    Dennis Aaen
    0

    Hi Carl,

    Here is also a guide to how to disable the altTemplate in Umbraco. I would also work with Umbraco 7

    https://our.umbraco.org/forum/templating/templates-and-document-types/50392-How-to-disable-TemplateName-altTemplate-behaviour-in-v6

    /Dennis

  • Carl Jackson 139 posts 478 karma points
    Sep 22, 2015 @ 13:08
    Carl Jackson
    0

    Thanks Dennis

    Looks like that is the same suggestion as my link.

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft