Copied to clipboard

Flag this post as spam?

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


  • ayyaz 16 posts 36 karma points
    Mar 03, 2010 @ 16:22
    ayyaz
    0

    Related links in C#.net

    How do I read the links in umbraco related links control from C#.NET

     

    regards,

    Ayyaz

  • anthony hall 222 posts 536 karma points
    Mar 03, 2010 @ 16:26
    anthony hall
    0

    Ayyaz, can you expand further on what your trying to achieve?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 03, 2010 @ 17:03
    Dirk De Grave
    0

    You probably want to iterate the values found in a "related links" property on a document? If so, well, you'd need to convert the property's value to an xml document first (as the property value is stored as a *string* in the database) and iterate the xml document (either with linq2xml or xpath, depending on your dev environment)


    Cheers,

    /Dirk

     

  • Yaasier 1 post 21 karma points
    Dec 15, 2010 @ 15:17
    Yaasier
    0

    Hi

    I am new to umbraco. I've managed to get to this level but i can't acces the data for the links.

     

     

     

    foreach (Node x in GlobalSettings.HomeNode.Children)

    {

     

     

    foreach (Node child in x.Children){

     

    if (child.NodeTypeAlias == "Department")

    {

     

     

    if (Node.GetCurrent().Name == child.Name)

    {

     

     

    foreach (Node subchild in

    child.Children)

    {

     

    if(subchild.NodeTypeAlias == "DepartmentWidgetList"

    )

    {

     

    foreach (Node subsubchild in

    subchild.Children)

    {

     

    if (subsubchild.NodeTypeAlias == "QuickLinksWidget"

    )

    {

     

    foreach (Property n in

    subsubchild.Properties)

    {

     

    if (n.Alias == "repeatableContent"

    )

    {

     

    //What to do here

     

    }

     

     

Please Sign in or register to post replies

Write your reply to:

Draft