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?
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?
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?
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.
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
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?
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
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 :)
I guess its routing order is template first then page? Anyhow you live and learn.
Cheers
Ismail
is working on a reply...