Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Aug 22, 2013 @ 11:17
    Ismail Mayat
    0

    Model issue

    Guys,

    Using Umbraco 4.11.7 all been working fine. Just created a new page which is a child of the home page. In the razor macro I have and also when i output page id in the template the page is always seen to be the home page. The page has id of 1761 however when i do Model.Id its the home page id. Anyone seen this before? I have tried to delete the page and recreate it does the same thing.

    In the umbraco tables and xml cache the page is correct 1761 I cannot see why it thinks its the home page?

    Regards

    Ismail

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Aug 22, 2013 @ 11:20
    Morten Bock
    100

    First thing I would check. Is there a template with the same name as child page? Could be a routing issue, that causes the home page to be rendered with a different template, instead of rendering the child page?

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Aug 22, 2013 @ 11:25
    Ismail Mayat
    0

    Morten,

    You are the man the main #h5yr. I had page called SearchResults and template with same name hence it was doing home page with that template. However I guess the routing should obey allowed templates which it clearly does not?

    Anyhow I renamed and it all works.

    Many thanks

    Ismail

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Aug 22, 2013 @ 11:27
    Morten Bock
    0

    Tha altTemplate does not obey the list of allowed templates. But I think it would make sense if it preferred to show the page, and not the template, when the page actually exists.

    Glad it worked :)

  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Aug 22, 2013 @ 11:28
    Ismail Mayat
    0

    I guess its routing order is template first then page? Anyhow you live and learn.

    Cheers

    Ismail

  • 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