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)
Related links in C#.net
How do I read the links in umbraco related links control from C#.NET
regards,
Ayyaz
Ayyaz, can you expand further on what your trying to achieve?
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
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 (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
}
is working on a reply...