Copied to clipboard

Flag this post as spam?

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


  • Hardy Wang 91 posts 112 karma points
    Mar 28, 2012 @ 18:22
    Hardy Wang
    0

    Messy ancestor via Razor

    I am using Umbraco 4.7.1.1

    In one of my razor script I have var ancestors = Model.Ancestors(); and it returns an array of ancestors with IDs of 1396, 1049, 1050. The node if of the calling page is 1744.

    I opened umbraco.config and I have following information

    id="1744" parentID="1050" level="4" path="-1,1396,1831,1050,1744"

    id="1050" parentID="1831" level="3" path="-1,1396,1831,1050"

    id="1831" parentID="1396" level="2" path="-1,1396,1831"

    <MainDocumentType id="1396" parentID="-1" level="1" path="-1,1396" isDoc="">

    This is the path I am expecting. The node 1049 is in another tree, no parent of any of them I listed. I have no clue where the 1049 comes from when I call Model.Ancestors() from 1744 node.

    Any comments or ideas, what is wrong here?

  • Douglas Ludlow 210 posts 366 karma points
    Mar 28, 2012 @ 18:31
    Douglas Ludlow
    0

    You may try the "Republish entire site" from the context menu on the root Content node as it's possible that the problem node is still in the umbraco.config cache and republishing will clean that up.

Please Sign in or register to post replies

Write your reply to:

Draft